Table of Contents

Class SliderBuilder

Namespace
SharpConsoleUI.Builders
Assembly
SharpConsoleUI.dll

Fluent builder for creating SliderControl instances.

public sealed class SliderBuilder : IControlBuilder<SliderControl>
Inheritance
SliderBuilder
Implements
Inherited Members
Extension Methods

Constructors

SliderBuilder()

Initializes a new instance of the SliderBuilder class.

public SliderBuilder()

Methods

Build()

Builds the SliderControl instance.

public SliderControl Build()

Returns

SliderControl

Fill()

Sets vertical alignment to Fill (useful for vertical sliders in a container).

public SliderBuilder Fill()

Returns

SliderBuilder

Horizontal()

Sets the slider to horizontal orientation.

public SliderBuilder Horizontal()

Returns

SliderBuilder

OnValueChanged(EventHandler<double>)

Registers a handler for value changes.

public SliderBuilder OnValueChanged(EventHandler<double> handler)

Parameters

handler EventHandler<double>

Returns

SliderBuilder

ShowMinMaxLabels(bool)

Enables showing min and max labels at the track ends.

public SliderBuilder ShowMinMaxLabels(bool show = true)

Parameters

show bool

Returns

SliderBuilder

ShowValueLabel(bool)

Enables showing the current value label.

public SliderBuilder ShowValueLabel(bool show = true)

Parameters

show bool

Returns

SliderBuilder

StickyBottom()

Makes the control stick to the bottom during scrolling.

public SliderBuilder StickyBottom()

Returns

SliderBuilder

StickyTop()

Makes the control stick to the top during scrolling.

public SliderBuilder StickyTop()

Returns

SliderBuilder

Stretch()

Sets the control to stretch to fill available width.

public SliderBuilder Stretch()

Returns

SliderBuilder

Vertical()

Sets the slider to vertical orientation.

public SliderBuilder Vertical()

Returns

SliderBuilder

Visible(bool)

Sets the visibility.

public SliderBuilder Visible(bool visible)

Parameters

visible bool

Returns

SliderBuilder

WithAlignment(HorizontalAlignment)

Sets the horizontal alignment.

public SliderBuilder WithAlignment(HorizontalAlignment alignment)

Parameters

alignment HorizontalAlignment

Returns

SliderBuilder

WithBackgroundColor(Color)

Sets the background color.

public SliderBuilder WithBackgroundColor(Color color)

Parameters

color Color

Returns

SliderBuilder

WithFilledTrackColor(Color)

Sets the filled track color.

public SliderBuilder WithFilledTrackColor(Color color)

Parameters

color Color

Returns

SliderBuilder

WithFocusedThumbColor(Color)

Sets the focused thumb color.

public SliderBuilder WithFocusedThumbColor(Color color)

Parameters

color Color

Returns

SliderBuilder

WithHeight(int)

Sets the height (useful for vertical sliders).

public SliderBuilder WithHeight(int height)

Parameters

height int

Returns

SliderBuilder

WithLargeStep(double)

Sets the large step increment (Page Up/Down, Shift+Arrow).

public SliderBuilder WithLargeStep(double largeStep)

Parameters

largeStep double

Returns

SliderBuilder

WithMargin(Margin)

Sets the margin.

public SliderBuilder WithMargin(Margin margin)

Parameters

margin Margin

Returns

SliderBuilder

WithMargin(int, int, int, int)

Sets the margin.

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

Parameters

left int
top int
right int
bottom int

Returns

SliderBuilder

WithName(string)

Sets the control name.

public SliderBuilder WithName(string name)

Parameters

name string

Returns

SliderBuilder

WithRange(double, double)

Sets the min and max range.

public SliderBuilder WithRange(double min, double max)

Parameters

min double
max double

Returns

SliderBuilder

WithStep(double)

Sets the step increment.

public SliderBuilder WithStep(double step)

Parameters

step double

Returns

SliderBuilder

WithTag(object)

Sets an arbitrary tag object.

public SliderBuilder WithTag(object tag)

Parameters

tag object

Returns

SliderBuilder

WithThumbColor(Color)

Sets the thumb color.

public SliderBuilder WithThumbColor(Color color)

Parameters

color Color

Returns

SliderBuilder

WithTrackColor(Color)

Sets the unfilled track color.

public SliderBuilder WithTrackColor(Color color)

Parameters

color Color

Returns

SliderBuilder

WithValue(double)

Sets the current value.

public SliderBuilder WithValue(double value)

Parameters

value double

Returns

SliderBuilder

WithValueFormat(string)

Sets the format string for value labels.

public SliderBuilder WithValueFormat(string format)

Parameters

format string

Returns

SliderBuilder

WithVerticalAlignment(VerticalAlignment)

Sets the vertical alignment.

public SliderBuilder WithVerticalAlignment(VerticalAlignment alignment)

Parameters

alignment VerticalAlignment

Returns

SliderBuilder

WithWidth(int)

Sets the width.

public SliderBuilder WithWidth(int width)

Parameters

width int

Returns

SliderBuilder