windowsforms-devexpress-dot-xtraeditors-dot-repository-dot-repositoryitem-f26d90dc.md
Fires repeatedly when dragging an object over the editor.
Namespace : DevExpress.XtraEditors.Repository
Assembly : DevExpress.XtraEditors.v25.2.dll
NuGet Package : DevExpress.Win.Navigation
[DXCategory("Events")]
public event DragEventHandler DragOver
<DXCategory("Events")>
Public Event DragOver As DragEventHandler
The DragOver event's data class is DragEventArgs. The following properties provide information specific to this event:
| Property | Description |
|---|---|
| AllowedEffect | Gets which drag-and-drop operations are allowed by the originator (or source) of the drag event. |
| Data | Gets the IDataObject that contains the data associated with this event. |
| Effect | Gets or sets the target drop effect in a drag-and-drop operation. |
| KeyState | Gets the current state of the SHIFT, CTRL, and ALT keys, as well as the state of the mouse buttons. |
| X | Gets the x-coordinate of the mouse pointer, in screen coordinates. |
| Y | Gets the y-coordinate of the mouse pointer, in screen coordinates. |
Use the DragOver event to handle the dragging process. The DragOver event fires repeatedly when dragging over the target control. Handle this event in the following cases:
The allowed drop effect must be set using the Effect event parameter. Use it to specify the drop operation to be performed. This parameter’s value affects the mouse cursor’s appearance. The current mouse pointer coordinates and the key state can be obtained using the event parameter’s X , Y and KeyState properties. In addition to the current mouse coordinates and key state, the DragOver event also allows you to determine the data being dragged and the drag and drop effects allowed by the source control. These can be obtained using the Data and AllowedEffects parameters of the events.
See Also