Skip to main content

Class RadialProgress

A UI Toolkit VisualElement that renders a circular arc progress indicator. Exposes progress (0–100), maxAngle (0–360°), and showLabel as UXML attributes.

public class RadialProgress : VisualElement

Inheritance​

Examples​

// In UXML:
//

// In C#:
var ring = new RadialProgress { progress = 50f, maxAngle = 270f };
rootVisualElement.Add(ring);

Remarks​

Track and fill colors are controlled via the USS custom properties --track-color and --progress-color. The arc starts at the top (−90°) and sweeps clockwise.

Constructors​

RadialProgress()​

Initializes a new RadialProgress and registers the repaint callback.

public RadialProgress()

Fields​

ussClassName​

USS class name applied to the root element.

public static readonly string ussClassName

Field Value​

string

ussLabelClassName​

USS class name applied to the percentage label.

public static readonly string ussLabelClassName

Field Value​

string

Properties​

maxAngle​

Gets or sets the maximum sweep angle of the arc in degrees (0–360). A value of 360 draws a complete circle; smaller values draw a partial arc.

public float maxAngle { get; set; }

Property Value​

float

progress​

Gets or sets the current fill amount as a percentage (0–100). Updates the label text and triggers a repaint on change.

public float progress { get; set; }

Property Value​

float

showLabel​

Gets or sets whether the percentage label is visible inside the arc.

public bool showLabel { get; set; }

Property Value​

bool