Skip to content

DroppableContext ​

Namespace: Hex1b

Assembly: Hex1b.dll

A context for building the child tree of a . Provides access to the current drag-hover state from the underlying node.

csharp
public sealed class DroppableContext : WidgetContext<DroppableWidget>

Inheritance ​

Object → WidgetContext<DroppableWidget> → DroppableContext

Properties ​

CanAcceptDrag ​

Whether the currently hovering dragged item passes the Accept predicate. False if no drag is hovering.

Returns: Boolean

csharp
public bool CanAcceptDrag { get; }

HoveredDragData ​

The drag data of the item currently hovering over this target. Null if no drag is hovering.

Returns: Object

csharp
public object? HoveredDragData { get; }

IsHoveredByDrag ​

Whether a dragged item is currently hovering over this drop target.

Returns: Boolean

csharp
public bool IsHoveredByDrag { get; }

Methods ​

DropTarget(string, Func<DropTargetContext, Hex1bWidget>) ​

Creates a drop target insertion point within this droppable region. The builder receives a with indicating whether this is the nearest target to the cursor.

Parameters:

Returns: DropTargetWidget

csharp
public DropTargetWidget DropTarget(string id, Func<DropTargetContext, Hex1bWidget> builder)

Released under the MIT License.