DiagramControl.QueryItemSnapping Event

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

Namespace: DevExpress.XtraDiagram

Assembly: DevExpress.XtraDiagram.v20.1.dll

Declaration

[DiagramCategory(DiagramCategory.DiagramItems)]
public event EventHandler<DiagramQueryItemSnappingEventArgs> QueryItemSnapping
<DiagramCategory(DiagramCategory.DiagramItems)>
Public Event QueryItemSnapping As EventHandler(Of DiagramQueryItemSnappingEventArgs)

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