Properties
Name | Type | Default | Description |
---|---|---|---|
Items | |||
ItemRenderer |
RenderFragment<T> |
null | The render fragment (template) that should be used to render the items within a drop zone |
Items |
IEnumerable<T> |
The items that can be drag and dropped within the container | |
ItemsClassSelector |
Func<T, string, string> |
null | |
ItemsSelector |
Func<T, string, bool> |
null | The method is used to determinate if an item can be dropped within a drop zone |
Disable | |||
DisabledClass |
string |
"disabled" | If a drop item is disabled (determinate by MudDropContainer.ItemIsDisabled). This class is applied to the element |
ItemIsDisabled |
Func<T, bool> |
null | The method is used to determinate if an item should be disabled for dragging. Defaults to allow all items |
DraggingClass | |||
DraggingClass |
string |
null | An additional class that is applied to the drop zone where a drag operation started |
ItemDraggingClass |
string |
null | An additional class that is applied to an drop item, when it is dragged |
DropRules | |||
ApplyDropClassesOnDragStarted |
bool |
False | If true, drop classes CanDropClass MudDropContainer.CanDropClass or NoDropClass MudDropContainer.NoDropClass or applied as soon, as a transaction has started |
CanDrop |
Func<T, string, bool> |
null | The method is used to determinate if an item can be dropped within a drop zone |
CanDropClass |
string |
null | The CSS class(es), that is applied to drop zones that are a valid target for drag and drop transaction |
NoDropClass |
string |
null | The CSS class(es), that is applied to drop zones that are NOT valid target for drag and drop transaction |
Appearance | |||
ChildContent |
RenderFragment |
null | Child content of component. This should include the drop zones |
Common | |||
Class |
string |
null | User class names, separated by space. |
Style |
string |
null | User styles, applied on top of the component's own classes and styles. |
Tag |
object |
null | Use Tag to attach any user data object to the component for your convenience. |
UserAttributes |
Dictionary<string, object> |
UserAttributes carries all attributes you add to the component that don't match any of its parameters. They will be splatted onto the underlying HTML tag. | |
EventCallbacks
Name | Type | Description |
---|---|---|
ItemDropped |
EventCallback<MudItemDropInfo<T>> | Callback that indicates that an item has been dropped on a drop zone. Should be used to update the "status" of the data item |
ItemPicked |
EventCallback<MudDragAndDropItemTransaction<T>> | EventHandler that indicates that an item has been picked from a drop zone and transaction has started. |
Methods
Name | Parameters | Return | Description |
---|---|---|---|
add_RefreshRequested(EventHandler value) |
EventHandler value |
||
add_TransactionEnded(EventHandler<MudDragAndDropTransactionFinishedEventArgs<T>> value) |
EventHandler<MudDragAndDropTransactionFinishedEventArgs<T>> value |
||
add_TransactionIndexChanged(EventHandler<MudDragAndDropIndexChangedEventArgs> value) |
EventHandler<MudDragAndDropIndexChangedEventArgs> value |
||
add_TransactionStarted(EventHandler<MudDragAndDropItemTransaction<T>> value) |
EventHandler<MudDragAndDropItemTransaction<T>> value |
||
Task CancelTransaction() |
Task |
||
Task CommitTransaction(string dropZoneIdentifier, bool reorderIsAllowed) |
string dropZoneIdentifier bool reorderIsAllowed |
Task |
|
string GetTransactionCurrentZoneIdentiifer() |
string |
||
int GetTransactionIndex() |
int |
||
T GetTransactionItem() |
T |
||
string GetTransactionOrignZoneIdentiifer() |
string |
||
bool HasTransactionIndexChanged() |
bool |
||
bool IsItemMovedDownwards() |
bool |
||
bool IsOrign(int index, string identifier) |
int index string identifier |
bool |
|
bool IsTransactionOriginatedFromInside(string identifier) |
string identifier |
bool |
|
Refresh() |
Refreshes the drop zone and all items within. This is needed in case of adding items to the collection or changed values of items | ||
remove_RefreshRequested(EventHandler value) |
EventHandler value |
||
remove_TransactionEnded(EventHandler<MudDragAndDropTransactionFinishedEventArgs<T>> value) |
EventHandler<MudDragAndDropTransactionFinishedEventArgs<T>> value |
||
remove_TransactionIndexChanged(EventHandler<MudDragAndDropIndexChangedEventArgs> value) |
EventHandler<MudDragAndDropIndexChangedEventArgs> value |
||
remove_TransactionStarted(EventHandler<MudDragAndDropItemTransaction<T>> value) |
EventHandler<MudDragAndDropItemTransaction<T>> value |
||
StartTransaction(T item, string identifier, int index, Func<Task> commitCallback, Func<Task> cancelCallback) |
T item string identifier int index Func<Task> commitCallback Func<Task> cancelCallback |
||
bool TransactionInProgress() |
bool |
||
UpdateTransactionIndex(int index) |
int index |