SpinnerWidget
Namespace: Hex1b.Widgets
Assembly: Hex1b.dll
Displays an animated spinner to indicate ongoing activity.
public sealed record SpinnerWidget : Hex1bWidget, IEquatable<Hex1bWidget>, IEquatable<SpinnerWidget>Inheritance
Object → Hex1bWidget → SpinnerWidget
Implements
Properties
FrameIndex
Gets the explicit frame index for manual control, or null for time-based animation.
Returns: Nullable<Int32>
public int? FrameIndex { get; init; }Style
Gets the explicit spinner style, or null to use the theme's default.
Returns: SpinnerStyle
public SpinnerStyle? Style { get; init; }Remarks
SpinnerWidget shows a single animated character (or multi-character sequence) that cycles through frames to indicate ongoing work.
By default, spinners are time-based: the animation runs at the style's suggested interval regardless of how often the screen is redrawn. Use to schedule periodic redraws.
For manual control, set to explicitly control which frame is displayed.
The spinner style can be set explicitly or inherited from the theme via .
Examples
Time-based spinner (recommended):
ctx.Spinner()
.RedrawAfter(100); // Redraw periodically; animation is time-basedSpinner with explicit style:
ctx.Spinner(SpinnerStyle.Arrow)
.RedrawAfter(100);Manual frame control:
ctx.Spinner(SpinnerStyle.Dots, frameIndex: myFrameCounter)