Table of Contents

Class ProgressBarBuilder

Namespace
SharpConsoleUI.Builders
Assembly
SharpConsoleUI.dll

Fluent builder for creating ProgressBarControl instances.

public class ProgressBarBuilder
Inheritance
ProgressBarBuilder
Inherited Members

Constructors

ProgressBarBuilder()

Initializes a new instance of the ProgressBarBuilder class.

public ProgressBarBuilder()

Methods

Build()

Builds the ProgressBarControl instance.

public ProgressBarControl Build()

Returns

ProgressBarControl

Indeterminate(bool)

Enables or disables indeterminate (pulsing) mode.

public ProgressBarBuilder Indeterminate(bool indeterminate = true)

Parameters

indeterminate bool

Returns

ProgressBarBuilder

ShowHeader(bool)

Sets whether to show the header.

public ProgressBarBuilder ShowHeader(bool show = true)

Parameters

show bool

Returns

ProgressBarBuilder

ShowPercentage(bool)

Sets whether to show the percentage text.

public ProgressBarBuilder ShowPercentage(bool show = true)

Parameters

show bool

Returns

ProgressBarBuilder

StickyBottom()

Makes the control stick to the bottom during scrolling.

public ProgressBarBuilder StickyBottom()

Returns

ProgressBarBuilder

StickyTop()

Makes the control stick to the top during scrolling.

public ProgressBarBuilder StickyTop()

Returns

ProgressBarBuilder

Stretch()

Sets the bar to stretch to fill available width.

public ProgressBarBuilder Stretch()

Returns

ProgressBarBuilder

Visible(bool)

Sets the visibility.

public ProgressBarBuilder Visible(bool visible)

Parameters

visible bool

Returns

ProgressBarBuilder

WithAlignment(HorizontalAlignment)

Sets the horizontal alignment.

public ProgressBarBuilder WithAlignment(HorizontalAlignment alignment)

Parameters

alignment HorizontalAlignment

Returns

ProgressBarBuilder

WithAnimationInterval(int)

Sets the animation interval in milliseconds for indeterminate mode.

public ProgressBarBuilder WithAnimationInterval(int milliseconds)

Parameters

milliseconds int

Returns

ProgressBarBuilder

WithBackgroundColor(Color)

Sets the background color.

public ProgressBarBuilder WithBackgroundColor(Color color)

Parameters

color Color

Returns

ProgressBarBuilder

WithBarWidth(int)

Sets the bar width in characters.

public ProgressBarBuilder WithBarWidth(int width)

Parameters

width int

Returns

ProgressBarBuilder

WithColors(Color, Color)

Sets both filled and unfilled colors.

public ProgressBarBuilder WithColors(Color filled, Color unfilled)

Parameters

filled Color
unfilled Color

Returns

ProgressBarBuilder

WithFilledColor(Color)

Sets the filled color.

public ProgressBarBuilder WithFilledColor(Color color)

Parameters

color Color

Returns

ProgressBarBuilder

WithHeader(string)

Sets the header text and enables header display.

public ProgressBarBuilder WithHeader(string header)

Parameters

header string

Returns

ProgressBarBuilder

WithMargin(Margin)

Sets the margin.

public ProgressBarBuilder WithMargin(Margin margin)

Parameters

margin Margin

Returns

ProgressBarBuilder

WithMargin(int, int, int, int)

Sets the margin.

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

Parameters

left int
top int
right int
bottom int

Returns

ProgressBarBuilder

WithMaxValue(double)

Sets the maximum value (100% fill).

public ProgressBarBuilder WithMaxValue(double maxValue)

Parameters

maxValue double

Returns

ProgressBarBuilder

WithName(string)

Sets the control name.

public ProgressBarBuilder WithName(string name)

Parameters

name string

Returns

ProgressBarBuilder

WithPercentage(double)

Sets the progress as a percentage (sets MaxValue=100 and Value).

public ProgressBarBuilder WithPercentage(double percentage)

Parameters

percentage double

Returns

ProgressBarBuilder

WithPercentageColor(Color)

Sets the percentage text color.

public ProgressBarBuilder WithPercentageColor(Color color)

Parameters

color Color

Returns

ProgressBarBuilder

WithPulseWidth(int)

Sets the width of the pulse segment in indeterminate mode.

public ProgressBarBuilder WithPulseWidth(int width)

Parameters

width int

Returns

ProgressBarBuilder

WithTag(object)

Sets an arbitrary tag object.

public ProgressBarBuilder WithTag(object tag)

Parameters

tag object

Returns

ProgressBarBuilder

WithUnfilledColor(Color)

Sets the unfilled color.

public ProgressBarBuilder WithUnfilledColor(Color color)

Parameters

color Color

Returns

ProgressBarBuilder

WithValue(double)

Sets the current value.

public ProgressBarBuilder WithValue(double value)

Parameters

value double

Returns

ProgressBarBuilder

WithVerticalAlignment(VerticalAlignment)

Sets the vertical alignment.

public ProgressBarBuilder WithVerticalAlignment(VerticalAlignment alignment)

Parameters

alignment VerticalAlignment

Returns

ProgressBarBuilder

WithWidth(int)

Sets the width.

public ProgressBarBuilder WithWidth(int width)

Parameters

width int

Returns

ProgressBarBuilder