Skip to content

DropTargetNode ​

Namespace: Hex1b.Nodes

Assembly: Hex1b.dll

A node that marks an insertion point for drag-and-drop within a . Visibility is controlled by the builder callback: when inactive, the builder typically returns a zero-height widget; when active (nearest to cursor), it returns a visual indicator.

csharp
public sealed class DropTargetNode : Hex1bNode

Inheritance ​

Object → Hex1bNode → DropTargetNode

Properties ​

Child ​

The single child node (the visual indicator).

Returns: Hex1bNode

csharp
public Hex1bNode? Child { get; set; }

DragData ​

The drag data of the item currently being dragged. Null if no drag is active.

Returns: Object

csharp
public object? DragData { get; set; }

IsActive ​

Whether this is the currently active drop target (nearest to cursor). Set by during drag operations.

Returns: Boolean

csharp
public bool IsActive { get; set; }

IsFocusable ​

Returns true if this node can receive focus.

Returns: Boolean

csharp
public override bool IsFocusable { get; }

TargetId ​

Unique identifier for this drop target within its parent droppable.

Returns: String

csharp
public string TargetId { 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.