Back to Devexpress

RepositoryItem.DragDrop Event

windowsforms-devexpress-dot-xtraeditors-dot-repository-dot-repositoryitem-2893eb33.md

latest3.2 KB
Original Source

RepositoryItem.DragDrop Event

Fires when an object is dropped onto the editor.

Namespace : DevExpress.XtraEditors.Repository

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[DXCategory("Events")]
public event DragEventHandler DragDrop
vb
<DXCategory("Events")>
Public Event DragDrop As DragEventHandler

Event Data

The DragDrop event's data class is DragEventArgs. The following properties provide information specific to this event:

PropertyDescription
AllowedEffectGets which drag-and-drop operations are allowed by the originator (or source) of the drag event.
DataGets the IDataObject that contains the data associated with this event.
EffectGets or sets the target drop effect in a drag-and-drop operation.
KeyStateGets the current state of the SHIFT, CTRL, and ALT keys, as well as the state of the mouse buttons.
XGets the x-coordinate of the mouse pointer, in screen coordinates.
YGets the y-coordinate of the mouse pointer, in screen coordinates.

Remarks

If dropping is allowed by the RepositoryItem.DragEnter and RepositoryItem.DragOver event handlers, it can be handled using the DragDrop event. This implies inserting the dragged data into the target control. Use the event’s Data parameter to determine which data should be used to modify the editor’s value.

See Also

DragEnter

DragOver

RepositoryItem Class

RepositoryItem Members

DevExpress.XtraEditors.Repository Namespace