Table of Contents

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

SpinnerControl

Outline(bool)

Renders the spinner in outline style.

public SpinnerBuilder Outline(bool outline = true)

Parameters

outline bool

Returns

SpinnerBuilder

Spinning(bool)

Sets whether the spinner starts animating (default true).

public SpinnerBuilder Spinning(bool spinning = true)

Parameters

spinning bool

Returns

SpinnerBuilder

StickyBottom()

Makes the control stick to the bottom during scrolling.

public SpinnerBuilder StickyBottom()

Returns

SpinnerBuilder

StickyTop()

Makes the control stick to the top during scrolling.

public SpinnerBuilder StickyTop()

Returns

SpinnerBuilder

Visible(bool)

Sets the visibility.

public SpinnerBuilder Visible(bool visible)

Parameters

visible bool

Returns

SpinnerBuilder

WithAlignment(HorizontalAlignment)

Sets the horizontal alignment.

public SpinnerBuilder WithAlignment(HorizontalAlignment alignment)

Parameters

alignment HorizontalAlignment

Returns

SpinnerBuilder

WithColor(Color)

Sets the foreground color for plain frames.

public SpinnerBuilder WithColor(Color color)

Parameters

color Color

Returns

SpinnerBuilder

WithColorRole(ColorRole, ThemeMode?)

Sets the control's semantic colour role (drives the spinner glyph colour).

public SpinnerBuilder WithColorRole(ColorRole role, ThemeMode? mode = null)

Parameters

role ColorRole
mode ThemeMode?

Returns

SpinnerBuilder

WithFrames(params string[])

Sets custom frames (overrides style). May contain markup.

public SpinnerBuilder WithFrames(params string[] frames)

Parameters

frames string[]

Returns

SpinnerBuilder

WithInterval(int)

Sets the per-frame interval in milliseconds.

public SpinnerBuilder WithInterval(int milliseconds)

Parameters

milliseconds int

Returns

SpinnerBuilder

WithMargin(Margin)

Sets the margin.

public SpinnerBuilder WithMargin(Margin margin)

Parameters

margin Margin

Returns

SpinnerBuilder

WithMargin(int, int, int, int)

Sets the margin.

public SpinnerBuilder WithMargin(int left, int top, int right, int bottom)

Parameters

left int
top int
right int
bottom int

Returns

SpinnerBuilder

WithName(string)

Sets the control name.

public SpinnerBuilder WithName(string name)

Parameters

name string

Returns

SpinnerBuilder

WithStyle(SpinnerStyle)

Sets the preset frame style.

public SpinnerBuilder WithStyle(SpinnerStyle style)

Parameters

style SpinnerStyle

Returns

SpinnerBuilder

WithTag(object)

Sets an arbitrary tag.

public SpinnerBuilder WithTag(object tag)

Parameters

tag object

Returns

SpinnerBuilder

WithVerticalAlignment(VerticalAlignment)

Sets the vertical alignment.

public SpinnerBuilder WithVerticalAlignment(VerticalAlignment alignment)

Parameters

alignment VerticalAlignment

Returns

SpinnerBuilder

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

width int

Returns

SpinnerBuilder