Table of Contents

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 T

The item being dragged.

identifier string

The unique ID of the zone where the transaction started.

index int

The 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

string

Index

The index of the item in the current drop zone.

public int Index { get; }

Property Value

int

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

int

SourceZoneIdentifier

The unique ID of the zone where the transaction started.

public string SourceZoneIdentifier { get; init; }

Property Value

string

Methods

Cancel()

Cancels this transaction.

public Task Cancel()

Returns

Task

Commit()

Commits this transaction.

public Task Commit()

Returns

Task