Back to Devexpress

DiagramControl.QueryItemSnapping Event

windowsforms-devexpress-dot-xtradiagram-dot-diagramcontrol-f8b96645.md

latest2.2 KB
Original Source

DiagramControl.QueryItemSnapping Event

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

Namespace : DevExpress.XtraDiagram

Assembly : DevExpress.XtraDiagram.v25.2.dll

NuGet Package : DevExpress.Win.Diagram

Declaration

csharp
[DiagramCategory(DiagramCategory.DiagramItems)]
public event EventHandler<DiagramQueryItemSnappingEventArgs> QueryItemSnapping
vb
<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:

PropertyDescription
AllowSpecifies whether to snap of diagram items.
ItemReturns the item that is being dragged by the end-user.
SnapToReturns 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

DiagramControl Class

DiagramControl Members

DevExpress.XtraDiagram Namespace