ProgressWidget
Namespace: Hex1b.Widgets
Assembly: Hex1b.dll
Displays a progress bar that can show either determinate (known completion percentage) or indeterminate (unknown completion) progress.
public sealed record ProgressWidget : Hex1bWidget, IEquatable<Hex1bWidget>, IEquatable<ProgressWidget>Inheritance
Object → Hex1bWidget → ProgressWidget
Implements
Constructors
ProgressWidget()
Creates a new determinate progress widget.
public ProgressWidget()Properties
IsIndeterminate
Gets a value indicating whether the progress bar is in indeterminate mode.
Returns: Boolean
public bool IsIndeterminate { get; init; }Maximum
Gets the maximum value of the progress range.
Returns: Double
public double Maximum { get; init; }Minimum
Gets the minimum value of the progress range.
Returns: Double
public double Minimum { get; init; }Value
Gets the current value of the progress bar.
Returns: Double
public double Value { get; init; }Fields
DefaultAnimationInterval
Default animation interval for indeterminate progress bars.
Returns: TimeSpan
public static readonly TimeSpan DefaultAnimationIntervalRemarks
The progress widget has two modes:
Determinate: Shows progress as a filled bar from to . The current value is set via . Values can be any range, not just 0-100.
Indeterminate: Shows an animated indicator when the completion amount is unknown. Set to true for this mode. Animation is time-based and automatic.
By default, the progress bar fills the available horizontal space. Use layout extensions like FixedWidth() to constrain its size.
Examples
Determinate progress (0-100%):
ctx.Progress(current: 75)Custom range (e.g., bytes downloaded):
ctx.Progress(current: 1500, min: 0, max: 5000)Indeterminate progress (self-animating):
ctx.ProgressIndeterminate()