Table of Contents

Class RuleBuilder

Namespace
SharpConsoleUI.Builders
Assembly
SharpConsoleUI.dll

Fluent builder for rule controls (horizontal separator lines)

public sealed class RuleBuilder
Inheritance
RuleBuilder
Inherited Members

Methods

Build()

Builds the rule control

public RuleControl Build()

Returns

RuleControl

The configured control

StickyBottom()

Makes the control stick to the bottom of the window

public RuleBuilder StickyBottom()

Returns

RuleBuilder

The builder for chaining

StickyTop()

Makes the control stick to the top of the window

public RuleBuilder StickyTop()

Returns

RuleBuilder

The builder for chaining

TitleCenter()

Centers the title

public RuleBuilder TitleCenter()

Returns

RuleBuilder

The builder for chaining

TitleLeft()

Aligns the title to the left

public RuleBuilder TitleLeft()

Returns

RuleBuilder

The builder for chaining

TitleRight()

Aligns the title to the right

public RuleBuilder TitleRight()

Returns

RuleBuilder

The builder for chaining

Visible(bool)

Sets the visibility

public RuleBuilder Visible(bool visible = true)

Parameters

visible bool

True if visible

Returns

RuleBuilder

The builder for chaining

WithAlignment(HorizontalAlignment)

Sets the horizontal alignment

public RuleBuilder WithAlignment(HorizontalAlignment alignment)

Parameters

alignment HorizontalAlignment

The alignment

Returns

RuleBuilder

The builder for chaining

WithColor(Color)

Sets the color of the rule line

public RuleBuilder WithColor(Color color)

Parameters

color Color

The line color

Returns

RuleBuilder

The builder for chaining

WithMargin(Margin)

Sets the margin

public RuleBuilder WithMargin(Margin margin)

Parameters

margin Margin

The margin

Returns

RuleBuilder

The builder for chaining

WithMargin(int)

Sets uniform margin on all sides

public RuleBuilder WithMargin(int margin)

Parameters

margin int

The margin value

Returns

RuleBuilder

The builder for chaining

WithMargin(int, int, int, int)

Sets the margin

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

Parameters

left int

Left margin

top int

Top margin

right int

Right margin

bottom int

Bottom margin

Returns

RuleBuilder

The builder for chaining

WithName(string)

Sets the control name for FindControl queries

public RuleBuilder WithName(string name)

Parameters

name string

The control name

Returns

RuleBuilder

The builder for chaining

WithStickyPosition(StickyPosition)

Sets the sticky position

public RuleBuilder WithStickyPosition(StickyPosition position)

Parameters

position StickyPosition

The sticky position

Returns

RuleBuilder

The builder for chaining

WithTag(object)

Sets the control tag for custom data storage

public RuleBuilder WithTag(object tag)

Parameters

tag object

The tag object

Returns

RuleBuilder

The builder for chaining

WithTitle(string)

Sets the title text displayed within the rule

public RuleBuilder WithTitle(string title)

Parameters

title string

The title text

Returns

RuleBuilder

The builder for chaining

WithTitleAlignment(Justify)

Sets the title alignment

public RuleBuilder WithTitleAlignment(Justify alignment)

Parameters

alignment Justify

The title alignment

Returns

RuleBuilder

The builder for chaining

WithVerticalAlignment(VerticalAlignment)

Sets the vertical alignment

public RuleBuilder WithVerticalAlignment(VerticalAlignment alignment)

Parameters

alignment VerticalAlignment

The vertical alignment

Returns

RuleBuilder

The builder for chaining

WithWidth(int)

Sets the width

public RuleBuilder WithWidth(int width)

Parameters

width int

The width

Returns

RuleBuilder

The builder for chaining

Operators

implicit operator RuleControl(RuleBuilder)

Implicit conversion to RuleControl

public static implicit operator RuleControl(RuleBuilder builder)

Parameters

builder RuleBuilder

Returns

RuleControl