Class SpinnerBuilder
- Namespace
- SharpConsoleUI.Builders
- Assembly
- SharpConsoleUI.dll
Fluent builder for SpinnerControl.
public class SpinnerBuilder : IControlBuilder<SpinnerControl>
- Inheritance
-
SpinnerBuilder
- Implements
- Inherited Members
- Extension Methods
Methods
Build()
Builds the configured SpinnerControl.
public SpinnerControl Build()
Returns
Outline(bool)
Renders the spinner in outline style.
public SpinnerBuilder Outline(bool outline = true)
Parameters
outlinebool
Returns
Spinning(bool)
Sets whether the spinner starts animating (default true).
public SpinnerBuilder Spinning(bool spinning = true)
Parameters
spinningbool
Returns
StickyBottom()
Makes the control stick to the bottom during scrolling.
public SpinnerBuilder StickyBottom()
Returns
StickyTop()
Makes the control stick to the top during scrolling.
public SpinnerBuilder StickyTop()
Returns
Visible(bool)
Sets the visibility.
public SpinnerBuilder Visible(bool visible)
Parameters
visiblebool
Returns
WithAlignment(HorizontalAlignment)
Sets the horizontal alignment.
public SpinnerBuilder WithAlignment(HorizontalAlignment alignment)
Parameters
alignmentHorizontalAlignment
Returns
WithColor(Color)
Sets the foreground color for plain frames.
public SpinnerBuilder WithColor(Color color)
Parameters
colorColor
Returns
WithColorRole(ColorRole, ThemeMode?)
Sets the control's semantic colour role (drives the spinner glyph colour).
public SpinnerBuilder WithColorRole(ColorRole role, ThemeMode? mode = null)
Parameters
Returns
WithFrames(params string[])
Sets custom frames (overrides style). May contain markup.
public SpinnerBuilder WithFrames(params string[] frames)
Parameters
framesstring[]
Returns
WithInterval(int)
Sets the per-frame interval in milliseconds.
public SpinnerBuilder WithInterval(int milliseconds)
Parameters
millisecondsint
Returns
WithMargin(Margin)
Sets the margin.
public SpinnerBuilder WithMargin(Margin margin)
Parameters
marginMargin
Returns
WithMargin(int, int, int, int)
Sets the margin.
public SpinnerBuilder WithMargin(int left, int top, int right, int bottom)
Parameters
Returns
WithName(string)
Sets the control name.
public SpinnerBuilder WithName(string name)
Parameters
namestring
Returns
WithStyle(SpinnerStyle)
Sets the preset frame style.
public SpinnerBuilder WithStyle(SpinnerStyle style)
Parameters
styleSpinnerStyle
Returns
WithTag(object)
Sets an arbitrary tag.
public SpinnerBuilder WithTag(object tag)
Parameters
tagobject
Returns
WithVerticalAlignment(VerticalAlignment)
Sets the vertical alignment.
public SpinnerBuilder WithVerticalAlignment(VerticalAlignment alignment)
Parameters
alignmentVerticalAlignment
Returns
WithWidth(int)
Sets an explicit minimum width (columns). Clamped up to the widest frame so the glyph never clips; larger values pad the reserved field (e.g. to align with other controls).
public SpinnerBuilder WithWidth(int width)
Parameters
widthint