Skip to content
ConsoleMonster
Class

MultiSelect

ConsoleMonster.Interactive

Namespace
ConsoleMonster.Interactive
Assembly
ConsoleMonster
Implements
IWidget
Modifiers
sealed

A filtered multi-choice layout input. Space or Enter toggles a choice; standard list shortcuts remain available.

Inheritance

Usage

Explore 24 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 12

Constructors

public MultiSelect(string name, IEnumerable<Choice> choices) #

Creates a multi-choice input honoring enabled choices marked as initially selected.

Parameters

name string required
The application-state key.
choices System.Collections.Generic.IEnumerable<ConsoleMonster.Interactive.Choice> required
Available choices, configured before running.

Properties

public IReadOnlyList<object?> Value { get; set; } #

A detached, read-only snapshot in choice declaration order. Assignments replace the selection atomically.

Exceptions

  • ArgumentNullException – The assigned list is null.
  • ArgumentException – A value does not identify an enabled choice.

Extension Methods

public static MultiSelect WithEnabled(MultiSelect multiSelect, bool value = true) #

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

Parameters

multiSelect ConsoleMonster.Interactive.MultiSelect required
The instance.
value bool = true optional
The value (default true).

Returns

MultiSelect The same instance.
public static MultiSelect WithLabel(MultiSelect multiSelect, string? value) #

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

Parameters

multiSelect ConsoleMonster.Interactive.MultiSelect required
The instance.
value string? required
The value.

Returns

MultiSelect The same instance.
public static MultiSelect WithPageSize(MultiSelect multiSelect, int value) #

Sets SelectionInputBase.PageSize: The preferred number of choice rows, at least one. Set before running.

Parameters

multiSelect ConsoleMonster.Interactive.MultiSelect required
The instance.
value int required
The value.

Returns

MultiSelect The same instance.
public static MultiSelect WithTabIndex(MultiSelect multiSelect, int value) #

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

Parameters

multiSelect ConsoleMonster.Interactive.MultiSelect required
The instance.
value int required
The value.

Returns

MultiSelect The same instance.
public static MultiSelect WithValidationMessage(MultiSelect multiSelect, string? value) #

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

Parameters

multiSelect ConsoleMonster.Interactive.MultiSelect required
The instance.
value string? required
The value.

Returns

MultiSelect The same instance.
public static MultiSelect WithValue(MultiSelect multiSelect, IReadOnlyList<object?> value) #

Sets MultiSelect.Value: A detached, read-only snapshot in choice declaration order. Assignments replace the selection atomically.

Parameters

multiSelect ConsoleMonster.Interactive.MultiSelect required
The instance.
value System.Collections.Generic.IReadOnlyList<object?> required
The value.

Returns

MultiSelect The same instance.