Skip to main content

RepositoryItem.DragOver Event

Fires repeatedly when dragging an object over the editor.

Namespace: DevExpress.XtraEditors.Repository

Assembly: DevExpress.XtraEditors.v23.2.dll

NuGet Package: DevExpress.Win.Navigation


public event DragEventHandler DragOver

Event Data

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:

  • when objects can be dropped to a particular area within the editor;
  • when several dropping operations can be performed. This implies that you can either move or copy the dragged data to the target control. For example, you may want to set the drop effect with respect to the state of the CTRL key.

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