Skip to content

DropTargetWidget

Namespace: Hex1b.Widgets

Assembly: Hex1b.dll

A widget that marks an insertion point inside a . When a drag operation is active, the nearest DropTarget to the cursor becomes active and its builder callback can render a visual indicator (e.g., a separator line). When inactive, the node measures as zero height so it doesn't create gaps.

csharp
public sealed record DropTargetWidget : Hex1bWidget, IEquatable<Hex1bWidget>, IEquatable<DropTargetWidget>

Inheritance

ObjectHex1bWidgetDropTargetWidget

Implements

Constructors

DropTargetWidget(string, Func<DropTargetContext, Hex1bWidget>)

A widget that marks an insertion point inside a . When a drag operation is active, the nearest DropTarget to the cursor becomes active and its builder callback can render a visual indicator (e.g., a separator line). When inactive, the node measures as zero height so it doesn't create gaps.

Parameters:

csharp
public DropTargetWidget(string Id, Func<DropTargetContext, Hex1bWidget> Builder)

Properties

Builder

A builder that receives a and returns the content to render.

Returns: Func<DropTargetContext, Hex1bWidget>

csharp
public Func<DropTargetContext, Hex1bWidget> Builder { get; init; }

Id

A unique identifier for this drop target within its parent droppable.

Returns: String

csharp
public string Id { get; init; }

Released under the MIT License.