Skip to content
ConsoleMonster
Class

ToggleInputOptions

ConsoleMonster.Interactive

Namespace
ConsoleMonster.Interactive
Assembly
ConsoleMonster
Modifiers
sealed

Constructs a Boolean application input.

Inheritance

Usage

Explore 44 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.

Accepted by parameters 25

Constructors

public ToggleInputOptions() #

Properties

public bool Value { get; set; } #

The initial Boolean value.

public string? OnText { get; set; } #

Text for the checked value; null uses the localized Yes label.

public string? OffText { get; set; } #

Text for the unchecked value; null uses the localized No label.

Extension Methods

public static Toggle Build(ToggleInputOptions options) #

Creates a toggle through the shared input factory.

Parameters

options ConsoleMonster.Interactive.ToggleInputOptions required
The configured definition.

Returns

Toggle The toggle.
public static ToggleInputOptions Configure(ToggleInputOptions toggleInputOptions, Action<ToggleInputOptions> configure) #

Assigns callbacks and related configuration without invoking delegate-valued properties.

Parameters

toggleInputOptions ConsoleMonster.Interactive.ToggleInputOptions required
The instance.
configure System.Action<ConsoleMonster.Interactive.ToggleInputOptions> required
Assignments applied in order.

Returns

ToggleInputOptions The same instance.

Examples

// C# initializer or property                                                      // C# fluent
new global::ConsoleMonster.Interactive.ToggleInputOptions { OnChange = value };    Ui.Toggle().Configure(configured => configured.OnChange = value);
Disabled 2 overloads
public static ToggleInputOptions Disabled(ToggleInputOptions toggleInputOptions, bool value) #

Sets AppInputOptions.Disabled: Disables editing and keyboard focus.

Parameters

toggleInputOptions ConsoleMonster.Interactive.ToggleInputOptions required
The instance.
value bool required
The value.

Returns

ToggleInputOptions The same instance.

Examples

// C# initializer or property                                                      // C# fluent
new global::ConsoleMonster.Interactive.ToggleInputOptions { Disabled = value };    Ui.Toggle().Disabled(value);
public static ToggleInputOptions Disabled(ToggleInputOptions toggleInputOptions) #

Sets AppInputOptions.Disabled to true.

Parameters

toggleInputOptions ConsoleMonster.Interactive.ToggleInputOptions required
The instance to configure.

Returns

ToggleInputOptions The same instance.
public static ToggleInputOptions Key(ToggleInputOptions toggleInputOptions, string value) #

Sets AppInputOptions.Key: The unique application-state key.

Parameters

toggleInputOptions ConsoleMonster.Interactive.ToggleInputOptions required
The instance.
value string required
The value.

Returns

ToggleInputOptions The same instance.

Examples

// C# initializer or property                                                 // C# fluent
new global::ConsoleMonster.Interactive.ToggleInputOptions { Key = value };    Ui.Toggle().Key(value);
public static ToggleInputOptions Label(ToggleInputOptions toggleInputOptions, string? value) #

Sets AppInputOptions.Label: The visible label; null uses the key.

Parameters

toggleInputOptions ConsoleMonster.Interactive.ToggleInputOptions required
The instance.
value string? required
The value.

Returns

ToggleInputOptions The same instance.

Examples

// C# initializer or property                                                   // C# fluent
new global::ConsoleMonster.Interactive.ToggleInputOptions { Label = value };    Ui.Toggle().Label(value);
public static ToggleInputOptions OffText(ToggleInputOptions toggleInputOptions, string? value) #

Sets ToggleInputOptions.OffText: Text for the unchecked value; null uses the localized No label.

Parameters

toggleInputOptions ConsoleMonster.Interactive.ToggleInputOptions required
The instance.
value string? required
The value.

Returns

ToggleInputOptions The same instance.

Examples

// C# initializer or property                                                     // C# fluent
new global::ConsoleMonster.Interactive.ToggleInputOptions { OffText = value };    Ui.Toggle().OffText(value);
public static ToggleInputOptions OnText(ToggleInputOptions toggleInputOptions, string? value) #

Sets ToggleInputOptions.OnText: Text for the checked value; null uses the localized Yes label.

Parameters

toggleInputOptions ConsoleMonster.Interactive.ToggleInputOptions required
The instance.
value string? required
The value.

Returns

ToggleInputOptions The same instance.

Examples

// C# initializer or property                                                    // C# fluent
new global::ConsoleMonster.Interactive.ToggleInputOptions { OnText = value };    Ui.Toggle().OnText(value);
public static ToggleInputOptions TabIndex(ToggleInputOptions toggleInputOptions, int value) #

Sets AppInputOptions.TabIndex: Keyboard focus order; equal values preserve declaration order.

Parameters

toggleInputOptions ConsoleMonster.Interactive.ToggleInputOptions required
The instance.
value int required
The value.

Returns

ToggleInputOptions The same instance.

Examples

// C# initializer or property                                                      // C# fluent
new global::ConsoleMonster.Interactive.ToggleInputOptions { TabIndex = value };    Ui.Toggle().TabIndex(value);
public static ToggleInputOptions ValidationMessage(ToggleInputOptions toggleInputOptions, string? value) #

Sets AppInputOptions.ValidationMessage: Initial validation text.

Parameters

toggleInputOptions ConsoleMonster.Interactive.ToggleInputOptions required
The instance.
value string? required
The value.

Returns

ToggleInputOptions The same instance.

Examples

// C# initializer or property                                                               // C# fluent
new global::ConsoleMonster.Interactive.ToggleInputOptions { ValidationMessage = value };    Ui.Toggle().ValidationMessage(value);
Value 2 overloads
public static ToggleInputOptions Value(ToggleInputOptions toggleInputOptions, bool value) #

Sets ToggleInputOptions.Value: The initial Boolean value.

Parameters

toggleInputOptions ConsoleMonster.Interactive.ToggleInputOptions required
The instance.
value bool required
The value.

Returns

ToggleInputOptions The same instance.

Examples

// C# initializer or property                                                   // C# fluent
new global::ConsoleMonster.Interactive.ToggleInputOptions { Value = value };    Ui.Toggle().Value(value);
public static ToggleInputOptions Value(ToggleInputOptions toggleInputOptions) #

Sets ToggleInputOptions.Value to true.

Parameters

toggleInputOptions ConsoleMonster.Interactive.ToggleInputOptions required
The instance to configure.

Returns

ToggleInputOptions The same instance.