windowsforms-devexpress-dot-utils-dot-dragdrop-dot-dxdrageventargs.md
Gets or sets the drag-and-drop action (Copy, Move, etc.) to perform.
Namespace : DevExpress.Utils.DragDrop
Assembly : DevExpress.Utils.v25.2.dll
NuGet Packages : DevExpress.Utils, DevExpress.Wpf.Core
public DragDropActions Action { get; set; }
Public Property Action As DragDropActions
| Type | Description |
|---|---|
| DragDropActions |
A DragDropActions enumeration value that specifies the drag-and-drop action (Copy, Move, etc.) to perform.
|
Available values:
| Name | Description |
|---|---|
| All |
The combination of the Copy, Move, and Scroll actions.
| | Link |
The data from the source control is linked to the target control.
| | Copy |
The data from the source control is copied to the target control.
| | Move |
The data from the source control is moved to the target control.
| | Scroll |
The target control is scrolled while dragging a node to a position that is not currently visible in the target control.
| | None |
The target control does not accept data.
|
The default action depends on the pressed modifier key. For instance, data is copied if the Ctrl key is pressed or moved if the Shift key is pressed. You can override the default action or set the property to None to cancel the action. If the action is set to None, the cursor automatically changes to the circle-backslash symbol.
The following code snippets (auto-collected from DevExpress Examples) contain references to the Action property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
drag-drop-grid-rows-to-treelist/CS/DragAndDropRows/Form1.cs#L112
e.Default();
e.Action = DragDropActions.Copy;
e.Handled = true;
winforms-grid-reorder-rows-drag-drop/CS/E764/Form1.cs#L55
e.InsertIndicatorLocation = args.InsertIndicatorLocation;
e.Action = args.Action;
Cursor.Current = args.Cursor;
drag-drop-grid-rows-to-treelist/VB/DragAndDropRows/Form1.vb#L107
e.Default()
e.Action = DragDropActions.Copy
e.Handled = True
winforms-grid-reorder-rows-drag-drop/VB/E764/Form1.vb#L62
e.InsertIndicatorLocation = args.InsertIndicatorLocation
e.Action = args.Action
Cursor.Current = args.Cursor
See Also