Skip to content
ConsoleMonster
Class

ToggleFluent

ConsoleMonster.Interactive

Namespace
ConsoleMonster.Interactive
Assembly
ConsoleMonster
Modifiers
static
Attributes
GeneratedCode("ConsoleMonster.Generators", "1.0.0")

The fluent methods of Toggle, generated from its public properties: With... sets a property and Add... adds to a collection, both returning the same instance.

Inheritance

  • object
  • ToggleFluent

Methods

public static Toggle WithEnabled(Toggle toggle, bool value = true) #

Sets InputControl.Enabled: Whether the control accepts input and participates in focus traversal.

Parameters

toggle ConsoleMonster.Interactive.Toggle required
The instance.
value bool = true optional
The value (default true).

Returns

Toggle The same instance.
public static Toggle WithLabel(Toggle toggle, string? value) #

Sets InputControl.Label: The visible label, or null to use the name.

Parameters

toggle ConsoleMonster.Interactive.Toggle required
The instance.
value string? required
The value.

Returns

Toggle The same instance.
public static Toggle WithOffText(Toggle toggle, string? value) #

Sets Toggle.OffText: Text after the unchecked box; null uses the current language's No label.

Parameters

toggle ConsoleMonster.Interactive.Toggle required
The instance.
value string? required
The value.

Returns

Toggle The same instance.
public static Toggle WithOnText(Toggle toggle, string? value) #

Sets Toggle.OnText: Text after the checked box; null uses the current language's Yes label.

Parameters

toggle ConsoleMonster.Interactive.Toggle required
The instance.
value string? required
The value.

Returns

Toggle The same instance.
public static Toggle WithTabIndex(Toggle toggle, int value) #

Sets InputControl.TabIndex: Focus order; equal values preserve declaration order.

Parameters

toggle ConsoleMonster.Interactive.Toggle required
The instance.
value int required
The value.

Returns

Toggle The same instance.
public static Toggle WithValidationMessage(Toggle toggle, string? value) #

Sets InputControl.ValidationMessage: The current validation message below the control, or null.

Parameters

toggle ConsoleMonster.Interactive.Toggle required
The instance.
value string? required
The value.

Returns

Toggle The same instance.
public static Toggle WithValue(Toggle toggle, bool value = true) #

Sets Toggle.Value: The committed on/off value. Assignments notify only when the value changes.

Parameters

toggle ConsoleMonster.Interactive.Toggle required
The instance.
value bool = true optional
The value (default true).

Returns

Toggle The same instance.