BackgroundPanelNode
Namespace: Hex1b.Nodes
Assembly: Hex1b.dll
Render node for . Fills its bounds with a background color, then renders the child on top. Everything else (measure, arrange, focus, input) is delegated to the child.
public sealed class BackgroundPanelNode : Hex1bNodeInheritance
Object → Hex1bNode → BackgroundPanelNode
Properties
Child
The child node.
Returns: Hex1bNode
public Hex1bNode? Child { get; set; }Color
The explicit background color to fill. Takes precedence over .
Returns: Hex1bColor
public Hex1bColor Color { get; set; }IsFocusable
Returns true if this node can receive focus.
Returns: Boolean
public override bool IsFocusable { get; }IsFocused
Gets or sets whether this node is currently focused. Only meaningful for focusable nodes (where IsFocusable is true).
Returns: Boolean
public override bool IsFocused { get; set; }ThemeElement
Optional theme element to read background color from at render time. Used when the color should come from the theme rather than being hardcoded.
Returns: Hex1bThemeElement<Hex1bColor>
public Hex1bThemeElement<Hex1bColor>? ThemeElement { 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:
rect(Rect):
protected override void ArrangeCore(Rect rect)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)