Skip to content

AccordionContext

Namespace: Hex1b.Widgets

Assembly: Hex1b.dll

Provides a fluent API context for building Accordion structures. This context exposes section-creation methods to guide developers toward the correct API usage.

csharp
public readonly struct AccordionContext

Methods

Section(Func<WidgetContext<VStackWidget>, IEnumerable<Hex1bWidget>>)

Creates a section with the specified content builder. Use to set the section title.

Parameters:

Returns: AccordionSectionWidget

An AccordionSectionWidget configured with the specified content.

csharp
public AccordionSectionWidget Section(Func<WidgetContext<VStackWidget>, IEnumerable<Hex1bWidget>> contentBuilder)

Section(string, Func<WidgetContext<VStackWidget>, IEnumerable<Hex1bWidget>>)

Creates a section with the specified title and content builder.

Parameters:

Returns: AccordionSectionWidget

An AccordionSectionWidget configured with the specified title and content.

csharp
public AccordionSectionWidget Section(string title, Func<WidgetContext<VStackWidget>, IEnumerable<Hex1bWidget>> contentBuilder)

Released under the MIT License.