Skip to content

AccordionSectionAction ​

Namespace: Hex1b.Widgets

Assembly: Hex1b.dll

Represents an action icon displayed in an accordion section header. Can be a simple icon or a toggle that changes appearance based on expand state.

csharp
public sealed record AccordionSectionAction : IEquatable<AccordionSectionAction>

Inheritance ​

Object → AccordionSectionAction

Implements ​

Properties ​

ExpandedIcon ​

Optional icon displayed when the section is expanded. Only used for toggle actions.

Returns: String

csharp
public string? ExpandedIcon { get; init; }

Icon ​

The icon displayed when the section is collapsed (or the only icon for non-toggle actions).

Returns: String

csharp
public string Icon { get; }

IsToggle ​

Whether this action is a toggle that changes icon based on section expand state.

Returns: Boolean

csharp
public bool IsToggle { get; init; }

Methods ​

OnClick(Action<AccordionSectionActionContext>) ​

Attaches a click handler to this action.

Parameters:

Returns: AccordionSectionAction

csharp
public AccordionSectionAction OnClick(Action<AccordionSectionActionContext> handler)

Released under the MIT License.