API Reference
Class
Rule
A horizontal line across the width, optionally with a title: ── Results ──────.
Inheritance
- Object
- Rule
Usage
Explore 13 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 7
- Method Ui.Rule
- Extension method Rule.WithAlignment
- Extension method Rule.WithLineToken
- Extension method Rule.WithTitle
- Method RuleFluent.WithAlignment
- Method RuleFluent.WithLineToken
- Method RuleFluent.WithTitle
Accepted by parameters 6
- Extension method Rule.WithAlignment
- Extension method Rule.WithLineToken
- Extension method Rule.WithTitle
- Method RuleFluent.WithAlignment
- Method RuleFluent.WithLineToken
- Method RuleFluent.WithTitle
Constructors
Methods
public Size Measure(Constraints constraints, RenderContext context) #Returns:
SizeReturns the size the widget wants within the constraints.
Parameters
- constraints ConsoleMonster.Layout.Constraints
- The space offered.
- context ConsoleMonster.Canvas.RenderContext
- Profile, theme and glyphs.
Returns
The desired size, never larger than the constraints.
public Void Render(Region region, RenderContext context) #Returns:
VoidRenders 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
public virtual Boolean Equals(Object? obj) #Returns:
BooleanInherited from Object
Parameters
- obj Object?
Properties
public ThemeToken LineToken { get; set; } #The line's theme token (default ThemeToken.Border).
Extension Methods
public static Rule WithAlignment(Rule rule, HorizontalAlignment value) #Returns:
RuleSets Rule.Alignment: Title alignment (default left).
Parameters
- rule ConsoleMonster.Widgets.Rule
- The instance.
- value ConsoleMonster.Layout.HorizontalAlignment
- The value.
Returns
The same instance.
public static Rule WithLineToken(Rule rule, ThemeToken value) #Returns:
RuleSets Rule.LineToken: The line's theme token (default ThemeToken.Border).
Parameters
- rule ConsoleMonster.Widgets.Rule
- The instance.
- value ConsoleMonster.Styling.ThemeToken
- The value.
Returns
The same instance.
public static Rule WithTitle(Rule rule, String? value) #Returns:
RuleSets Rule.Title: The title (markup).
Parameters
- rule ConsoleMonster.Widgets.Rule
- The instance.
- value System.String?
- The value.
Returns
The same instance.