MultiSelect
ConsoleMonster.Interactive
A filtered multi-choice layout input. Space or Enter toggles a choice; standard list shortcuts remain available.
Inheritance
- InputControl
- SelectionInputBase
- MultiSelect
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.
Returned or exposed by 12
- Extension method MultiSelect.WithEnabled
- Extension method MultiSelect.WithLabel
- Extension method MultiSelect.WithPageSize
- Extension method MultiSelect.WithTabIndex
- Extension method MultiSelect.WithValidationMessage
- Extension method MultiSelect.WithValue
- Method MultiSelectFluent.WithEnabled
- Method MultiSelectFluent.WithLabel
- Method MultiSelectFluent.WithPageSize
- Method MultiSelectFluent.WithTabIndex
- Method MultiSelectFluent.WithValidationMessage
- Method MultiSelectFluent.WithValue
Accepted by parameters 12
- Extension method MultiSelect.WithEnabled
- Extension method MultiSelect.WithLabel
- Extension method MultiSelect.WithPageSize
- Extension method MultiSelect.WithTabIndex
- Extension method MultiSelect.WithValidationMessage
- Extension method MultiSelect.WithValue
- Method MultiSelectFluent.WithEnabled
- Method MultiSelectFluent.WithLabel
- Method MultiSelectFluent.WithPageSize
- Method MultiSelectFluent.WithTabIndex
- Method MultiSelectFluent.WithValidationMessage
- Method MultiSelectFluent.WithValue
Constructors
public MultiSelect(string name, IEnumerable<Choice> choices) #Creates a multi-choice input honoring enabled choices marked as initially selected.
Parameters
- name string
- The application-state key.
- choices System.Collections.Generic.IEnumerable<ConsoleMonster.Interactive.Choice>
- Available choices, configured before running.
Inherited Methods
public bool HandleInput(InputEvent input, RenderContext context) #Parameters
- input InputEvent
- context RenderContext
Returns
boolpublic Size Measure(Constraints constraints, RenderContext context) #Parameters
- constraints Constraints
- context RenderContext
Returns
Sizepublic void Render(Region region, RenderContext context) #Parameters
- region Region
- context RenderContext
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.
Inherited Properties
Inherited Events
public event EventHandler<AppValueChangedEventArgs>? Changed #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
- The instance.
- value bool = true
- The value (default true).
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
- The instance.
- value string?
- The value.
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
- The instance.
- value int
- The value.
public static MultiSelect WithTabIndex(MultiSelect multiSelect, int value) #Sets InputControl.TabIndex: Focus order; equal values preserve declaration order.
Parameters
- multiSelect ConsoleMonster.Interactive.MultiSelect
- The instance.
- value int
- The value.
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
- The instance.
- value string?
- The value.
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
- The instance.
- value System.Collections.Generic.IReadOnlyList<object?>
- The value.