Rule Class

A renderable horizontal rule.
public sealed class Rule : Renderable, IRenderable, IHasJustification, IHasBoxBorder

Constructors

Rule()
Initializes a new instance of the Rule class.
Rule(string)
Initializes a new instance of the Rule class.

Properties

BoxBorder Border
Gets or sets the box.
Justify? Justification
Gets or sets the rule's title justification.
Style Style
Gets or sets the rule style.
string Title
Gets or sets the rule title markup text.

Methods

protected virtual Measurement Measure(RenderOptions, int)
Measures the renderable object.
protected override IEnumerable<Segment> Render(RenderOptions, int)
Renders the object.

Extension Methods

T AsciiBorder<Rule>()
Display an ASCII border.
T Border<Rule>(BoxBorder)
Sets the border.
T Centered<Rule>()
Sets the IHasJustification object to be centered.
T DoubleBorder<Rule>()
Display a double border.
IEnumerable<Segment> GetSegments(IAnsiConsole)
Gets the segments for a renderable using the specified console.
T HeavyBorder<Rule>()
Display a heavy border.
T Justify<Rule>(Justify?)
Sets the justification for an IHasJustification object.
T LeftJustified<Rule>()
Sets the IHasJustification object to be left justified.
T NoBorder<Rule>()
Do not display a border.
T RightJustified<Rule>()
Sets the IHasJustification object to be right justified.
T RoundedBorder<Rule>()
Display a rounded border.
Rule RuleStyle(Style)
Sets the rule style.
Rule RuleTitle(string)
Sets the rule title.
T SquareBorder<Rule>()
Display a square border.