Rule
ConsoleMonster.Widgets
A horizontal line across the width, optionally with a title: ── Results ──────.
Inheritance
- object
- Rule
Usage
Explore 19 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 9
- Method Ui.Rule
- Extension method Rule.Alignment
- Extension method Rule.LineRole
- Extension method Rule.LineStyle
- Extension method Rule.Title
- Method RuleFluent.Alignment
- Method RuleFluent.LineRole
- Method RuleFluent.LineStyle
- Method RuleFluent.Title
Accepted by parameters 10
- Method ContentBuilder.Rule
- Method ContentBuilder.Rule
- Extension method Rule.Alignment
- Extension method Rule.LineRole
- Extension method Rule.LineStyle
- Extension method Rule.Title
- Method RuleFluent.Alignment
- Method RuleFluent.LineRole
- Method RuleFluent.LineStyle
- Method RuleFluent.Title
Constructors
Methods
public Size Measure(Constraints constraints, RenderContext context) #Returns the size the widget wants within the constraints.
Parameters
- constraints ConsoleMonster.Layout.Constraints
- The space offered.
- context ConsoleMonster.Canvas.RenderContext
- Profile, theme and glyphs.
public void Render(Region region, RenderContext context) #Renders into a region. The region may be smaller or larger than the measured size.
Parameters
- region ConsoleMonster.Canvas.Region
- The target region.
- context ConsoleMonster.Canvas.RenderContext
- Profile, theme and glyphs.
Inherited Methods
Properties
public ThemeToken LineRole { get; set; } #The line's theme role (default ThemeToken.Border).
public BoxStyle? LineStyle { get; set; } #The line's box style, or null to use the glyph profile's ordinary rule line.
Extension Methods
public static Rule Alignment(Rule rule, HorizontalAlignment value) #Sets Rule.Alignment: Title alignment (default left).
Parameters
- rule ConsoleMonster.Widgets.Rule
- The instance.
- value ConsoleMonster.Layout.HorizontalAlignment
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Widgets.Rule { Alignment = value }; Ui.Rule().Alignment(value);public static Rule LineRole(Rule rule, ThemeToken value) #Sets Rule.LineRole: The line's theme role (default ThemeToken.Border).
Parameters
- rule ConsoleMonster.Widgets.Rule
- The instance.
- value ConsoleMonster.Styling.ThemeToken
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Widgets.Rule { LineRole = value }; Ui.Rule().LineRole(value);public static Rule LineStyle(Rule rule, BoxStyle? value) #Sets Rule.LineStyle: The line's box style, or null to use the glyph profile's ordinary rule line.
Parameters
- rule ConsoleMonster.Widgets.Rule
- The instance.
- value ConsoleMonster.Glyphs.BoxStyle?
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Widgets.Rule { LineStyle = value }; Ui.Rule().LineStyle(value);public static Rule Title(Rule rule, string? value) #Sets Rule.Title: The title (markup).
Parameters
- rule ConsoleMonster.Widgets.Rule
- The instance.
- value string?
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Widgets.Rule { Title = value }; Ui.Rule().Title(value);