Class MudDragAndDropItemTransaction<T>
- Namespace
- MudBlazor
- Assembly
- MudBlazor.dll
The information related to a MudDropZone<T> drag-and-drop transaction.
public class MudDragAndDropItemTransaction<T>
Type Parameters
T
The type of item being dragged and dropped.
- Inheritance
-
MudDragAndDropItemTransaction<T>
- Inherited Members
- Extension Methods
Constructors
MudDragAndDropItemTransaction(T?, string, int, Func<Task>, Func<Task>)
Creates a new instance of a drag and drop transaction encapsulating the item and source
public MudDragAndDropItemTransaction(T? item, string identifier, int index, Func<Task> commitCallback, Func<Task> cancelCallback)
Parameters
item
TThe item being dragged.
identifier
stringThe unique ID of the zone where the transaction started.
index
intThe index of the item when the transaction started.
commitCallback
Func<Task>Occurs when the item was successfully dropped.
cancelCallback
Func<Task>Occurs when the drag-and-drop operation was canceled.
Properties
CurrentZone
The unique ID of the current destination zone.
public string CurrentZone { get; }
Property Value
Index
The index of the item in the current drop zone.
public int Index { get; }
Property Value
Item
The item being dragged.
public T? Item { get; init; }
Property Value
- T
SourceIndex
The index of the item when the transaction started.
public int SourceIndex { get; }
Property Value
SourceZoneIdentifier
The unique ID of the zone where the transaction started.
public string SourceZoneIdentifier { get; init; }
Property Value
Methods
Cancel()
Cancels this transaction.
public Task Cancel()
Returns
Commit()
Commits this transaction.
public Task Commit()