AlignNode
Namespace: Hex1b.Nodes
Assembly: Hex1b.dll
Render node for . Positions its child based on alignment flags.
public sealed class AlignNode : Hex1bNodeInheritance
Object → Hex1bNode → AlignNode
Properties
Alignment
The alignment flags for positioning the child.
Returns: Alignment
public Alignment Alignment { get; set; }Child
The child node to align.
Returns: Hex1bNode
public Hex1bNode? Child { 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 node for structural tree traversal. Container nodes should override this to return their children.
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)Remarks
AlignNode expands to fill available space and positions its child within that space. The alignment is determined by checking the flags for horizontal (Left, HCenter, Right) and vertical (Top, VCenter, Bottom) positioning.