Accordion
ConsoleMonster.Interactive
Collapsible sections stacked as a group that keeps one open: expanding a section folds the others. While a header has focus, + expands every section for reading and - folds them all; both are ordinary key bindings on the sections, so the footer lists them.
Inheritance
- object
- Accordion
Usage
Explore 8 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 4
- Extension method Accordion.Content
- Method Accordion.Add
- Method InteractiveFluent.Content
- Method Ui.Accordion
Accepted by parameters 4
- Extension method Accordion.Content
- Method InteractiveFluent.Content
- Method ContentBuilder.Accordion
- Method ContentBuilder.Accordion
Constructors
public Accordion(params Collapsible[] children) #Creates a group.
Parameters
- children ConsoleMonster.Interactive.Collapsible[]
- The sections, in order.
Methods
public Accordion Add(Collapsible section) #Adds a section. Add every section before the app runs.
Parameters
- section ConsoleMonster.Interactive.Collapsible
- The section; it can belong to one group.
public void ExpandAll() #Expands every section until one is folded or opened on its own again.
public Size Measure(Constraints constraints, RenderContext context) #Returns the size the widget wants within the constraints.
Parameters
- constraints ConsoleMonster.Layout.Constraints
- The space offered.
- context ConsoleMonster.Canvas.RenderContext
- Profile, theme and glyphs.
public void Render(Region region, RenderContext context) #Renders into a region. The region may be smaller or larger than the measured size.
Parameters
- region ConsoleMonster.Canvas.Region
- The target region.
- context ConsoleMonster.Canvas.RenderContext
- Profile, theme and glyphs.
Inherited Methods
Properties
Extension Methods
public static Accordion Content(Accordion accordion, IWidget content) #Configures this container's content before session ownership.
Parameters
- accordion ConsoleMonster.Interactive.Accordion
- The instance.
- content ConsoleMonster.Layout.IWidget
- The widget or nested content builder.
public static Accordion Content(Accordion accordion, Action<ContentBuilder> content) #Configures this container's content before session ownership.
Parameters
- accordion ConsoleMonster.Interactive.Accordion
- The instance.
- content System.Action<ConsoleMonster.Layout.ContentBuilder>
- The widget or nested content builder.