API Reference
Class
TextBlockFluent
The fluent methods of TextBlock, generated from its public properties: With... sets a property and Add... adds to a collection, both returning the same instance.
Inheritance
- Object
- TextBlockFluent
Methods
public static TextBlock WithAlignment(TextBlock textBlock, HorizontalAlignment value) #Returns:
TextBlockSets TextBlock.Alignment: Alignment (default left).
Parameters
- textBlock ConsoleMonster.Widgets.TextBlock
- The instance.
- value ConsoleMonster.Layout.HorizontalAlignment
- The value.
Returns
The same instance.
public static TextBlock WithContent(TextBlock textBlock, String value) #Returns:
TextBlockSets TextBlock.Content: The content (markup unless TextBlock.IsMarkup is false).
Parameters
- textBlock ConsoleMonster.Widgets.TextBlock
- The instance.
- value System.String
- The value.
Returns
The same instance.
public static TextBlock WithIsMarkup(TextBlock textBlock, Boolean value = true) #Returns:
TextBlockSets TextBlock.IsMarkup: Whether TextBlock.Content is markup (default true).
Parameters
- textBlock ConsoleMonster.Widgets.TextBlock
- The instance.
- value System.Boolean = true
- The value (default true).
Returns
The same instance.
public static TextBlock WithOverflow(TextBlock textBlock, TextOverflow value) #Returns:
TextBlockSets TextBlock.Overflow: Overflow handling (default wrap).
Parameters
- textBlock ConsoleMonster.Widgets.TextBlock
- The instance.
- value ConsoleMonster.Widgets.TextOverflow
- The value.
Returns
The same instance.
public static TextBlock WithToken(TextBlock textBlock, ThemeToken? value) #Returns:
TextBlockSets TextBlock.Token: A theme token layered under the text, or null.
Parameters
- textBlock ConsoleMonster.Widgets.TextBlock
- The instance.
- value ConsoleMonster.Styling.ThemeToken?
- The value.
Returns
The same instance.
Inherited Methods
public virtual Boolean Equals(Object? obj) #Returns:
BooleanInherited from Object
Parameters
- obj Object?