ProgressExtensions
Namespace: Hex1b
Assembly: Hex1b.dll
Extension methods for creating Progress widgets.
public static class ProgressExtensionsInheritance
Object → ProgressExtensions
Methods
Progress<TParent>(WidgetContext<TParent>, double, double, double)
Creates a determinate progress bar with a custom range.
Parameters:
ctx(WidgetContext<<TParent>>): The widget context.current(Double): The current progress value.min(Double): The minimum value of the range.max(Double): The maximum value of the range.
Returns: ProgressWidget
A new ProgressWidget configured for determinate mode with a custom range.
public static ProgressWidget Progress<TParent>(this WidgetContext<TParent> ctx, double current, double min, double max) where TParent : Hex1bWidgetProgress<TParent>(WidgetContext<TParent>, double)
Creates a determinate progress bar with a value from 0 to 100.
Parameters:
ctx(WidgetContext<<TParent>>): The widget context.current(Double): The current progress value (0-100 by default).
Returns: ProgressWidget
A new ProgressWidget configured for determinate mode.
public static ProgressWidget Progress<TParent>(this WidgetContext<TParent> ctx, double current) where TParent : Hex1bWidgetProgressIndeterminate<TParent>(WidgetContext<TParent>)
Creates an indeterminate progress bar for operations with unknown completion.
Parameters:
ctx(WidgetContext<<TParent>>): The widget context.
Returns: ProgressWidget
A new ProgressWidget configured for indeterminate mode with automatic animation.
public static ProgressWidget ProgressIndeterminate<TParent>(this WidgetContext<TParent> ctx) where TParent : Hex1bWidgetRemarks
Progress widgets come in two variants:
Determinate: Use when you know the completion amount.
Indeterminate: Use when completion is unknown. Animation is automatic and time-based.
Examples
Determinate progress (0-100):
ctx.VStack(v => [
v.Text("Downloading..."),
v.Progress(percentComplete)
])Custom range:
ctx.Progress(current: bytesDownloaded, min: 0, max: totalBytes)Indeterminate (self-animating):
ctx.ProgressIndeterminate()