The event handler receives an argument of type DiagramQueryItemSnappingEventArgs containing data related to this event.
The following
DiagramQueryItemSnappingEventArgs properties provide information specific to this event.
Property |
Description |
Allow |
Specifies whether to allow snapping of diagram items. |
Handled |
Gets or sets a value that indicates the present state of the event handling for a routed event as it travels the route. |
Item |
Returns the item that is being dragged by the end-user. |
OriginalSource |
Gets the original reporting source as determined by pure hit testing, before any possible System.Windows.RoutedEventArgs.Source adjustment by a parent class. |
RoutedEvent |
Gets or sets the System.Windows.RoutedEventArgs.RoutedEvent associated with this System.Windows.RoutedEventArgs instance. |
SnapTo |
Returns the diagram item to which the item being dragged by the end-user can be snapped. |
Source |
Gets or sets a reference to the object that raised the event. |
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.