ConditionalWidget
Namespace: Hex1b.Widgets
Assembly: Hex1b.dll
A widget that wraps content with a condition that determines whether it should be displayed. Used as part of a ResponsiveWidget to create conditional UI layouts.
csharp
public sealed record ConditionalWidget : Hex1bWidget, IEquatable<Hex1bWidget>, IEquatable<ConditionalWidget>Inheritance
Object → Hex1bWidget → ConditionalWidget
Implements
Constructors
ConditionalWidget(Func<int, int, bool>, Hex1bWidget)
A widget that wraps content with a condition that determines whether it should be displayed. Used as part of a ResponsiveWidget to create conditional UI layouts.
Parameters:
Condition(Func<Int32, Int32, Boolean>): A function that receives (availableWidth, availableHeight) and returns true if this content should be displayed.Content(Hex1bWidget): The content to display when the condition is met.
csharp
public ConditionalWidget(Func<int, int, bool> Condition, Hex1bWidget Content)Properties
Condition
A function that receives (availableWidth, availableHeight) and returns true if this content should be displayed.
Returns: Func<Int32, Int32, Boolean>
csharp
public Func<int, int, bool> Condition { get; init; }Content
The content to display when the condition is met.
Returns: Hex1bWidget
csharp
public Hex1bWidget Content { get; init; }