ProgressBar class Core
A slim bar that fills to a fraction: how much of the stock an order takes, how far a task got. Takes no input and lets the pointer through; read by assistive technology as its ProgressBar.Spoken text, else as the percentage.
Styling. From the style sheets (Select.Type<ProgressBar>()): the track (background), the fill (accent colour), the corner radius (none: fully rounded) and the opacity; the class warning fills it in the theme's amber, danger in its red.
public sealed class ProgressBar : Control
- Namespace
- ArionUI.Presentation.Controls
- Package
- ArionUI.Presentation ·
dotnet add package ArionUI.Presentation --prerelease - Inherits
- Control
Constructors
ProgressBar
public ProgressBar();
Properties
Role
public override ControlRole Role { get; }What KIND of part this is for assistive technology — the automation peers translate it into their host's control type.
Spoken
public Func<string>? Spoken { get; init; }What a reader says for the bar ("120 of 400 in stock"); null says the percentage.
Thickness
public double Thickness { get; init; }The thickness of the bar; it stands centred in its slot.
Value
public required Func<double> Value { get; init; }The fraction filled, 0 to 1; outside it is clamped.
Methods
HitTest
public override Control? HitTest(LogPoint p);The control under an ABSOLUTE point, or null. Containers recurse; leaves answer for themselves. Same bounds the render pass used.
Measure
public override LogSize Measure(LogSize available);Desired size given the space available (layout containers sum this).
Render
public override void Render(IRenderSurface s, ControlFrame frame);
SpokenLabel
public override string? SpokenLabel();What a screen reader speaks when this control receives the focus. A control that cannot take the focus but answers here is READ: it becomes a text part.