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
visibleboolTrue if visible
Returns
- RuleBuilder
The builder for chaining
WithAlignment(HorizontalAlignment)
Sets the horizontal alignment
public RuleBuilder WithAlignment(HorizontalAlignment alignment)
Parameters
alignmentHorizontalAlignmentThe alignment
Returns
- RuleBuilder
The builder for chaining
WithColor(Color)
Sets the color of the rule line
public RuleBuilder WithColor(Color color)
Parameters
colorColorThe line color
Returns
- RuleBuilder
The builder for chaining
WithMargin(Margin)
Sets the margin
public RuleBuilder WithMargin(Margin margin)
Parameters
marginMarginThe margin
Returns
- RuleBuilder
The builder for chaining
WithMargin(int)
Sets uniform margin on all sides
public RuleBuilder WithMargin(int margin)
Parameters
marginintThe 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
Returns
- RuleBuilder
The builder for chaining
WithName(string)
Sets the control name for FindControl queries
public RuleBuilder WithName(string name)
Parameters
namestringThe control name
Returns
- RuleBuilder
The builder for chaining
WithStickyPosition(StickyPosition)
Sets the sticky position
public RuleBuilder WithStickyPosition(StickyPosition position)
Parameters
positionStickyPositionThe sticky position
Returns
- RuleBuilder
The builder for chaining
WithTag(object)
Sets the control tag for custom data storage
public RuleBuilder WithTag(object tag)
Parameters
tagobjectThe tag object
Returns
- RuleBuilder
The builder for chaining
WithTitle(string)
Sets the title text displayed within the rule
public RuleBuilder WithTitle(string title)
Parameters
titlestringThe title text
Returns
- RuleBuilder
The builder for chaining
WithTitleAlignment(Justify)
Sets the title alignment
public RuleBuilder WithTitleAlignment(Justify alignment)
Parameters
alignmentJustifyThe title alignment
Returns
- RuleBuilder
The builder for chaining
WithVerticalAlignment(VerticalAlignment)
Sets the vertical alignment
public RuleBuilder WithVerticalAlignment(VerticalAlignment alignment)
Parameters
alignmentVerticalAlignmentThe vertical alignment
Returns
- RuleBuilder
The builder for chaining
WithWidth(int)
Sets the width
public RuleBuilder WithWidth(int width)
Parameters
widthintThe width
Returns
- RuleBuilder
The builder for chaining
Operators
implicit operator RuleControl(RuleBuilder)
Implicit conversion to RuleControl
public static implicit operator RuleControl(RuleBuilder builder)
Parameters
builderRuleBuilder