DiagramControl.QueryItemSnapping Event
Fires repeatedly as the end-user triggers snapping while dragging or resizing a diagram shape.
Namespace: DevExpress.XtraDiagram
Assembly: DevExpress.XtraDiagram.v24.1.dll
NuGet Package: DevExpress.Win.Diagram
Declaration
[DiagramCategory(DiagramCategory.DiagramItems)]
public event EventHandler<DiagramQueryItemSnappingEventArgs> QueryItemSnapping
Event Data
The QueryItemSnapping event's data class is DiagramQueryItemSnappingEventArgs. The following properties provide information specific to this event:
Property | Description |
---|---|
Allow | Specifies whether to snap of diagram items. |
Item | Returns the item that is being dragged by the end-user. |
SnapTo | Returns the diagram item to which the item being dragged by the end-user can be snapped. |
Remarks
The SnapTo event’s parameter returns the item suitable for snapping (nearest in height/width when the end-user resizes an item or one lying on the same line when the end-user drags an item). The item that is being moved or resized is returned by the Item parameter. The Allow parameter specifies whether to enable snapping to the suitable item.