ToggleFluent
ConsoleMonster.Interactive
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
- The instance.
- value bool = true
- The value (default true).
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
- The instance.
- value string?
- The value.
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
- The instance.
- value string?
- The value.
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
- The instance.
- value string?
- The value.
public static Toggle WithTabIndex(Toggle toggle, int value) #Sets InputControl.TabIndex: Focus order; equal values preserve declaration order.
Parameters
- toggle ConsoleMonster.Interactive.Toggle
- The instance.
- value int
- The value.
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
- The instance.
- value string?
- The value.
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
- The instance.
- value bool = true
- The value (default true).