Skip to content
ConsoleMonster
Class

CollapsibleInputOptions

ConsoleMonster.Interactive

Namespace
ConsoleMonster.Interactive
Assembly
ConsoleMonster
Implements
IContentOwner
Modifiers
sealed

Constructs a collapsible section using the same definition as New-ConsoleCollapsible.

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 CollapsibleInputOptions() #

Properties

public bool Expanded { get; set; } #

Whether the section starts expanded.

public string? Summary { get; set; } #

Muted text after the label while collapsed, such as a count.

public IWidget? Content { get; set; } #

The folded content.

Extension Methods

public static Collapsible Build(CollapsibleInputOptions options) #

Creates a collapsible section through the shared input factory.

Parameters

options ConsoleMonster.Interactive.CollapsibleInputOptions required
The configured definition.

Returns

Collapsible The section.
public static CollapsibleInputOptions Configure(CollapsibleInputOptions collapsibleInputOptions, Action<CollapsibleInputOptions> configure) #

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

Parameters

collapsibleInputOptions ConsoleMonster.Interactive.CollapsibleInputOptions required
The instance.
configure System.Action<ConsoleMonster.Interactive.CollapsibleInputOptions> required
Assignments applied in order.

Returns

CollapsibleInputOptions The same instance.

Examples

// C# initializer or property                                                           // C# fluent
new global::ConsoleMonster.Interactive.CollapsibleInputOptions { OnChange = value };    Ui.Collapsible().Configure(configured => configured.OnChange = value);
Content 2 overloads
public static CollapsibleInputOptions Content(CollapsibleInputOptions collapsibleInputOptions, IWidget content) #

Configures this container's content before session ownership.

Parameters

collapsibleInputOptions ConsoleMonster.Interactive.CollapsibleInputOptions required
The instance.
content ConsoleMonster.Layout.IWidget required
The widget or nested content builder.

Returns

CollapsibleInputOptions The same instance.
public static CollapsibleInputOptions Content(CollapsibleInputOptions collapsibleInputOptions, Action<ContentBuilder> content) #

Configures this container's content before session ownership.

Parameters

collapsibleInputOptions ConsoleMonster.Interactive.CollapsibleInputOptions required
The instance.
content System.Action<ConsoleMonster.Layout.ContentBuilder> required
The widget or nested content builder.

Returns

CollapsibleInputOptions The same instance.
Disabled 2 overloads
public static CollapsibleInputOptions Disabled(CollapsibleInputOptions collapsibleInputOptions, bool value) #

Sets AppInputOptions.Disabled: Disables editing and keyboard focus.

Parameters

collapsibleInputOptions ConsoleMonster.Interactive.CollapsibleInputOptions required
The instance.
value bool required
The value.

Returns

CollapsibleInputOptions The same instance.

Examples

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

Sets AppInputOptions.Disabled to true.

Parameters

collapsibleInputOptions ConsoleMonster.Interactive.CollapsibleInputOptions required
The instance to configure.

Returns

CollapsibleInputOptions The same instance.
Expanded 2 overloads
public static CollapsibleInputOptions Expanded(CollapsibleInputOptions collapsibleInputOptions, bool value) #

Sets CollapsibleInputOptions.Expanded: Whether the section starts expanded.

Parameters

collapsibleInputOptions ConsoleMonster.Interactive.CollapsibleInputOptions required
The instance.
value bool required
The value.

Returns

CollapsibleInputOptions The same instance.

Examples

// C# initializer or property                                                           // C# fluent
new global::ConsoleMonster.Interactive.CollapsibleInputOptions { Expanded = value };    Ui.Collapsible().Expanded(value);
public static CollapsibleInputOptions Expanded(CollapsibleInputOptions collapsibleInputOptions) #

Sets CollapsibleInputOptions.Expanded to true.

Parameters

collapsibleInputOptions ConsoleMonster.Interactive.CollapsibleInputOptions required
The instance to configure.

Returns

CollapsibleInputOptions The same instance.
public static CollapsibleInputOptions Key(CollapsibleInputOptions collapsibleInputOptions, string value) #

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

Parameters

collapsibleInputOptions ConsoleMonster.Interactive.CollapsibleInputOptions required
The instance.
value string required
The value.

Returns

CollapsibleInputOptions The same instance.

Examples

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

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

Parameters

collapsibleInputOptions ConsoleMonster.Interactive.CollapsibleInputOptions required
The instance.
value string? required
The value.

Returns

CollapsibleInputOptions The same instance.

Examples

// C# initializer or property                                                        // C# fluent
new global::ConsoleMonster.Interactive.CollapsibleInputOptions { Label = value };    Ui.Collapsible().Label(value);
public static CollapsibleInputOptions Summary(CollapsibleInputOptions collapsibleInputOptions, string? value) #

Sets CollapsibleInputOptions.Summary: Muted text after the label while collapsed, such as a count.

Parameters

collapsibleInputOptions ConsoleMonster.Interactive.CollapsibleInputOptions required
The instance.
value string? required
The value.

Returns

CollapsibleInputOptions The same instance.

Examples

// C# initializer or property                                                          // C# fluent
new global::ConsoleMonster.Interactive.CollapsibleInputOptions { Summary = value };    Ui.Collapsible().Summary(value);
public static CollapsibleInputOptions TabIndex(CollapsibleInputOptions collapsibleInputOptions, int value) #

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

Parameters

collapsibleInputOptions ConsoleMonster.Interactive.CollapsibleInputOptions required
The instance.
value int required
The value.

Returns

CollapsibleInputOptions The same instance.

Examples

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

Sets AppInputOptions.ValidationMessage: Initial validation text.

Parameters

collapsibleInputOptions ConsoleMonster.Interactive.CollapsibleInputOptions required
The instance.
value string? required
The value.

Returns

CollapsibleInputOptions The same instance.

Examples

// C# initializer or property                                                                    // C# fluent
new global::ConsoleMonster.Interactive.CollapsibleInputOptions { ValidationMessage = value };    Ui.Collapsible().ValidationMessage(value);