Skip to main content
A newer version of this page is available. .

DiagramControl.QueryItemSnapping Event

Fires repeatedly as the end-user triggers snapping while dragging or resizing a diagram shape.

Namespace: DevExpress.XtraDiagram

Assembly: DevExpress.XtraDiagram.v19.1.dll

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 allow snapping 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.

See Also