Skip to content
ConsoleMonster
Class

TextInputOptions

ConsoleMonster.Interactive

Namespace
ConsoleMonster.Interactive
Assembly
ConsoleMonster
Modifiers
sealed

One definition for single-line and multiline persistent text controls.

Inheritance

Usage

Explore 64 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 35

Constructors

public TextInputOptions() #

Properties

public bool Multiline { get; set; } #

Whether to create a multiline text area.

public string? Value { get; set; } #

The initial text; null is empty.

public string? Placeholder { get; set; } #

The hint shown while the value is empty.

public int MaxLength { get; set; } #

The maximum number of UTF-16 units.

public int Height { get; set; } #

Visible rows; valid only with Multiline.

public int ScrollRow { get; set; } #

The initial visible row; valid only with Multiline.

public string? Mask { get; set; } #

Single-line masking; null shows text and an empty string hides it.

public ThemeToken Role { get; set; } #

The single-line entered-text role.

Extension Methods

public static InputControl Build(TextInputOptions options) #

Creates single-line or multiline text through the shared input factory.

Parameters

options ConsoleMonster.Interactive.TextInputOptions required
The configured definition.

Returns

InputControl The control.
public static TextInputOptions Configure(TextInputOptions textInputOptions, Action<TextInputOptions> configure) #

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

Parameters

textInputOptions ConsoleMonster.Interactive.TextInputOptions required
The instance.
configure System.Action<ConsoleMonster.Interactive.TextInputOptions> required
Assignments applied in order.

Returns

TextInputOptions The same instance.

Examples

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

Sets AppInputOptions.Disabled: Disables editing and keyboard focus.

Parameters

textInputOptions ConsoleMonster.Interactive.TextInputOptions required
The instance.
value bool required
The value.

Returns

TextInputOptions The same instance.

Examples

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

Sets AppInputOptions.Disabled to true.

Parameters

textInputOptions ConsoleMonster.Interactive.TextInputOptions required
The instance to configure.

Returns

TextInputOptions The same instance.
public static TextInputOptions Height(TextInputOptions textInputOptions, int value) #

Sets TextInputOptions.Height: Visible rows; valid only with Multiline.

Parameters

textInputOptions ConsoleMonster.Interactive.TextInputOptions required
The instance.
value int required
The value.

Returns

TextInputOptions The same instance.

Examples

// C# initializer or property                                                  // C# fluent
new global::ConsoleMonster.Interactive.TextInputOptions { Height = value };    Ui.TextInput().Height(value);
public static TextInputOptions Key(TextInputOptions textInputOptions, string value) #

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

Parameters

textInputOptions ConsoleMonster.Interactive.TextInputOptions required
The instance.
value string required
The value.

Returns

TextInputOptions The same instance.

Examples

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

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

Parameters

textInputOptions ConsoleMonster.Interactive.TextInputOptions required
The instance.
value string? required
The value.

Returns

TextInputOptions The same instance.

Examples

// C# initializer or property                                                 // C# fluent
new global::ConsoleMonster.Interactive.TextInputOptions { Label = value };    Ui.TextInput().Label(value);
public static TextInputOptions Mask(TextInputOptions textInputOptions, string? value) #

Sets TextInputOptions.Mask: Single-line masking; null shows text and an empty string hides it.

Parameters

textInputOptions ConsoleMonster.Interactive.TextInputOptions required
The instance.
value string? required
The value.

Returns

TextInputOptions The same instance.

Examples

// C# initializer or property                                                // C# fluent
new global::ConsoleMonster.Interactive.TextInputOptions { Mask = value };    Ui.TextInput().Mask(value);
public static TextInputOptions MaxLength(TextInputOptions textInputOptions, int value) #

Sets TextInputOptions.MaxLength: The maximum number of UTF-16 units.

Parameters

textInputOptions ConsoleMonster.Interactive.TextInputOptions required
The instance.
value int required
The value.

Returns

TextInputOptions The same instance.

Examples

// C# initializer or property                                                     // C# fluent
new global::ConsoleMonster.Interactive.TextInputOptions { MaxLength = value };    Ui.TextInput().MaxLength(value);
Multiline 2 overloads
public static TextInputOptions Multiline(TextInputOptions textInputOptions, bool value) #

Sets TextInputOptions.Multiline: Whether to create a multiline text area.

Parameters

textInputOptions ConsoleMonster.Interactive.TextInputOptions required
The instance.
value bool required
The value.

Returns

TextInputOptions The same instance.

Examples

// C# initializer or property                                                     // C# fluent
new global::ConsoleMonster.Interactive.TextInputOptions { Multiline = value };    Ui.TextInput().Multiline(value);
public static TextInputOptions Multiline(TextInputOptions textInputOptions) #

Sets TextInputOptions.Multiline to true.

Parameters

textInputOptions ConsoleMonster.Interactive.TextInputOptions required
The instance to configure.

Returns

TextInputOptions The same instance.
public static TextInputOptions Placeholder(TextInputOptions textInputOptions, string? value) #

Sets TextInputOptions.Placeholder: The hint shown while the value is empty.

Parameters

textInputOptions ConsoleMonster.Interactive.TextInputOptions required
The instance.
value string? required
The value.

Returns

TextInputOptions The same instance.

Examples

// C# initializer or property                                                       // C# fluent
new global::ConsoleMonster.Interactive.TextInputOptions { Placeholder = value };    Ui.TextInput().Placeholder(value);
public static TextInputOptions Role(TextInputOptions textInputOptions, ThemeToken value) #

Sets TextInputOptions.Role: The single-line entered-text role.

Parameters

textInputOptions ConsoleMonster.Interactive.TextInputOptions required
The instance.
value ConsoleMonster.Styling.ThemeToken required
The value.

Returns

TextInputOptions The same instance.

Examples

// C# initializer or property                                                // C# fluent
new global::ConsoleMonster.Interactive.TextInputOptions { Role = value };    Ui.TextInput().Role(value);
public static TextInputOptions ScrollRow(TextInputOptions textInputOptions, int value) #

Sets TextInputOptions.ScrollRow: The initial visible row; valid only with Multiline.

Parameters

textInputOptions ConsoleMonster.Interactive.TextInputOptions required
The instance.
value int required
The value.

Returns

TextInputOptions The same instance.

Examples

// C# initializer or property                                                     // C# fluent
new global::ConsoleMonster.Interactive.TextInputOptions { ScrollRow = value };    Ui.TextInput().ScrollRow(value);
public static TextInputOptions TabIndex(TextInputOptions textInputOptions, int value) #

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

Parameters

textInputOptions ConsoleMonster.Interactive.TextInputOptions required
The instance.
value int required
The value.

Returns

TextInputOptions The same instance.

Examples

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

Sets AppInputOptions.ValidationMessage: Initial validation text.

Parameters

textInputOptions ConsoleMonster.Interactive.TextInputOptions required
The instance.
value string? required
The value.

Returns

TextInputOptions The same instance.

Examples

// C# initializer or property                                                             // C# fluent
new global::ConsoleMonster.Interactive.TextInputOptions { ValidationMessage = value };    Ui.TextInput().ValidationMessage(value);
public static TextInputOptions Value(TextInputOptions textInputOptions, string? value) #

Sets TextInputOptions.Value: The initial text; null is empty.

Parameters

textInputOptions ConsoleMonster.Interactive.TextInputOptions required
The instance.
value string? required
The value.

Returns

TextInputOptions The same instance.

Examples

// C# initializer or property                                                 // C# fluent
new global::ConsoleMonster.Interactive.TextInputOptions { Value = value };    Ui.TextInput().Value(value);