DragDropExtensions
Namespace: Hex1b
Assembly: Hex1b.dll
Extension methods for creating and .
csharp
public static class DragDropExtensionsInheritance
Object → DragDropExtensions
Methods
Draggable<TParent>(WidgetContext<TParent>, object, Func<DraggableContext, Hex1bWidget[]>)
Creates a draggable wrapper with an implicit VStack for multiple children.
Parameters:
ctx(WidgetContext<<TParent>>):dragData(Object):builder(Func<DraggableContext, Hex1bWidget[]>):
Returns: DraggableWidget
csharp
public static DraggableWidget Draggable<TParent>(this WidgetContext<TParent> ctx, object dragData, Func<DraggableContext, Hex1bWidget[]> builder) where TParent : Hex1bWidgetDraggable<TParent>(WidgetContext<TParent>, object, Func<DraggableContext, Hex1bWidget>)
Creates a draggable wrapper around a single child widget. The builder lambda receives a with to reflect the current drag state.
Parameters:
ctx(WidgetContext<<TParent>>): The parent widget context.dragData(Object): The reference data that will be passed to the drop target.builder(Func<DraggableContext, Hex1bWidget>): A builder that creates the child widget using drag state.
Returns: DraggableWidget
csharp
public static DraggableWidget Draggable<TParent>(this WidgetContext<TParent> ctx, object dragData, Func<DraggableContext, Hex1bWidget> builder) where TParent : Hex1bWidgetDroppable<TParent>(WidgetContext<TParent>, Func<DroppableContext, Hex1bWidget[]>)
Creates a droppable target with an implicit VStack for multiple children.
Parameters:
ctx(WidgetContext<<TParent>>):builder(Func<DroppableContext, Hex1bWidget[]>):
Returns: DroppableWidget
csharp
public static DroppableWidget Droppable<TParent>(this WidgetContext<TParent> ctx, Func<DroppableContext, Hex1bWidget[]> builder) where TParent : Hex1bWidgetDroppable<TParent>(WidgetContext<TParent>, Func<DroppableContext, Hex1bWidget>)
Creates a droppable target that can receive dragged items. The builder lambda receives a with and to reflect the current drag-hover state.
Parameters:
ctx(WidgetContext<<TParent>>): The parent widget context.builder(Func<DroppableContext, Hex1bWidget>): A builder that creates the child widget using drop state.
Returns: DroppableWidget
csharp
public static DroppableWidget Droppable<TParent>(this WidgetContext<TParent> ctx, Func<DroppableContext, Hex1bWidget> builder) where TParent : Hex1bWidget