Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DiagramControl.CustomItemDrag Event

Occurs when an end-user starts dragging a diagram item.

Namespace: DevExpress.XtraDiagram

Assembly: DevExpress.XtraDiagram.v24.2.dll

NuGet Package: DevExpress.Win.Diagram

#Declaration

[DiagramCategory(DiagramCategory.Behavior)]
public event EventHandler<DiagramCustomItemDragEventArgs> CustomItemDrag

#Event Data

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

Property Description
Data Provides data about the diagram items the end-user is dragging.
Items Returns the list of items that are objects of the drag-and-drop operation.
Result Returns the drag-and-drop operation result.
SourceItem Returns the item the end-user is dragging.
SourceItemPoint Returns the point on the canvas where the end-user initiated the drag-and-drop operation.

#Remarks

Handle the CustomItemDrag event to customize drag and drop for diagram items.

In the event handler, call the DragDrop.DoDragDrop method and assign the Data event parameter to the method’s data parameter.

See Also