Skip to content

PaddingNode ​

Namespace: Hex1b.Nodes

Assembly: Hex1b.dll

A node that adds invisible padding around its child content. Subtracts padding from constraints during measure and offsets the child during arrange.

csharp
public sealed class PaddingNode : Hex1bNode

Inheritance ​

Object → Hex1bNode → PaddingNode

Properties ​

Bottom ​

Returns: Int32

csharp
public int Bottom { get; set; }

Child ​

Returns: Hex1bNode

csharp
public Hex1bNode? Child { get; set; }

Left ​

Returns: Int32

csharp
public int Left { get; set; }

Returns: Int32

csharp
public int Right { get; set; }

Top ​

Returns: Int32

csharp
public int Top { 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:

csharp
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: IReadOnlyList<Hex1bNode>

csharp
public override IReadOnlyList<Hex1bNode> GetChildren()

GetFocusableNodes() ​

Gets all focusable nodes in this subtree (including this node if focusable).

Returns: IEnumerable<Hex1bNode>

csharp
public override IEnumerable<Hex1bNode> GetFocusableNodes()

MeasureCore(Constraints) ​

Override this method to implement measuring logic for this node.

Parameters:

Returns: Size

csharp
protected override Size MeasureCore(Constraints constraints)

Render(Hex1bRenderContext) ​

Renders the node to the given context.

Parameters:

csharp
public override void Render(Hex1bRenderContext context)

Released under the MIT License.