Skip to content

ResponsiveWidget

Namespace: Hex1b.Widgets

Assembly: Hex1b.dll

A widget that displays the first child whose condition evaluates to true. Conditions are evaluated during layout with the available size from parent constraints.

csharp
public sealed record ResponsiveWidget : Hex1bWidget, IEquatable<Hex1bWidget>, IEquatable<ResponsiveWidget>

Inheritance

ObjectHex1bWidgetResponsiveWidget

Implements

Constructors

ResponsiveWidget(IReadOnlyList<ConditionalWidget>)

A widget that displays the first child whose condition evaluates to true. Conditions are evaluated during layout with the available size from parent constraints.

Parameters:

csharp
public ResponsiveWidget(IReadOnlyList<ConditionalWidget> Branches)

Properties

Branches

The list of conditional widgets to evaluate. The first matching branch is displayed.

Returns: IReadOnlyList<ConditionalWidget>

csharp
public IReadOnlyList<ConditionalWidget> Branches { get; init; }

Released under the MIT License.