ResponsiveNode
Namespace: Hex1b.Nodes
Assembly: Hex1b.dll
A node that displays the first child whose condition evaluates to true. Conditions are evaluated during layout with the available size from parent constraints.
public sealed class ResponsiveNode : Hex1bNodeInheritance
Object → Hex1bNode → ResponsiveNode
Properties
ActiveBranchIndex
The index of the currently active branch (-1 if none match).
Returns: Int32
public int ActiveBranchIndex { get; }ActiveChild
Gets the currently active child node (the first one whose condition is true).
Returns: Hex1bNode
public Hex1bNode? ActiveChild { get; }Branches
The list of conditional branches to evaluate.
Returns: IReadOnlyList<ConditionalWidget>
public IReadOnlyList<ConditionalWidget> Branches { get; set; }ChildNodes
The reconciled child nodes corresponding to each branch.
Returns: List<Hex1bNode>
public List<Hex1bNode?> ChildNodes { get; set; }Methods
ArrangeCore(Rect)
Override this method to implement arranging logic for this node. The base implementation saves previous bounds, marks dirty on change, and sets bounds.
Parameters:
bounds(Rect):
protected override void ArrangeCore(Rect bounds)GetChildren()
Gets the direct children of this container for input routing.
Returns: IEnumerable<Hex1bNode>
public override IEnumerable<Hex1bNode> GetChildren()GetFocusableNodes()
Gets all focusable nodes in this subtree (including this node if focusable).
Returns: IEnumerable<Hex1bNode>
public override IEnumerable<Hex1bNode> GetFocusableNodes()MeasureCore(Constraints)
Override this method to implement measuring logic for this node.
Parameters:
constraints(Constraints):
Returns: Size
protected override Size MeasureCore(Constraints constraints)Render(Hex1bRenderContext)
Renders the node to the given context.
Parameters:
context(Hex1bRenderContext):
public override void Render(Hex1bRenderContext context)