Skip to content
ConsoleMonster
Class

TextBlockFluent

ConsoleMonster.Widgets

Namespace
ConsoleMonster.Widgets
Assembly
ConsoleMonster
Modifiers
static

The fluent methods of TextBlock, generated from its public properties: A property-named method sets a property and a singular-named method adds to a collection, both returning the same instance.

Inheritance

  • object
  • TextBlockFluent

Methods

public static TextBlock Alignment(TextBlock textBlock, HorizontalAlignment value) #

Sets TextBlock.Alignment: Alignment (default left).

Parameters

textBlock ConsoleMonster.Widgets.TextBlock required
The instance.
value ConsoleMonster.Layout.HorizontalAlignment required
The value.

Returns

TextBlock The same instance.

Examples

// C# initializer or property    // C# fluent
textBlock.Alignment = value;     Ui.Text().Alignment(value);
public static TextBlock Content(TextBlock textBlock, string value) #

Sets TextBlock.Content: Literal text, interpreted as markup only when TextBlock.IsMarkup is true.

Parameters

textBlock ConsoleMonster.Widgets.TextBlock required
The instance.
value string required
The value.

Returns

TextBlock The same instance.

Examples

// C# initializer or property    // C# fluent
textBlock.Content = value;       Ui.Text().Content(value);
public static TextBlock Markup(TextBlock textBlock, bool value = true) #

Sets TextBlock.IsMarkup: Whether TextBlock.Content is markup (default false).

Parameters

textBlock ConsoleMonster.Widgets.TextBlock required
The instance.
value bool = true optional
The value; true when omitted.

Returns

TextBlock The same instance.

Examples

// C# initializer or property    // C# fluent
textBlock.IsMarkup = value;      Ui.Text().Markup(value);
public static TextBlock Overflow(TextBlock textBlock, TextOverflow value) #

Sets TextBlock.Overflow: Overflow handling (default wrap).

Parameters

textBlock ConsoleMonster.Widgets.TextBlock required
The instance.
value ConsoleMonster.Widgets.TextOverflow required
The value.

Returns

TextBlock The same instance.

Examples

// C# initializer or property    // C# fluent
textBlock.Overflow = value;      Ui.Text().Overflow(value);
public static TextBlock Role(TextBlock textBlock, ThemeToken? value) #

Sets TextBlock.Role: A theme role layered under the text, or null.

Parameters

textBlock ConsoleMonster.Widgets.TextBlock required
The instance.
value ConsoleMonster.Styling.ThemeToken? required
The value.

Returns

TextBlock The same instance.

Examples

// C# initializer or property    // C# fluent
textBlock.Role = value;          Ui.Text().Role(value);
public static TextBlock WrapSeparator(TextBlock textBlock, string? value) #

Sets TextBlock.WrapSeparator: When set, wrap at this literal separator before breaking within an oversized entry.

Parameters

textBlock ConsoleMonster.Widgets.TextBlock required
The instance.
value string? required
The value.

Returns

TextBlock The same instance.

Examples

// C# initializer or property       // C# fluent
textBlock.WrapSeparator = value;    Ui.Text().WrapSeparator(value);