Occurs when users try to select a link, giving you a chance to cancel the operation.
Namespace: MindFusion.Diagramming.Wpf
Assembly: MindFusion.Diagramming.Wpf
C# Copy Code |
---|
public event EventHandler<LinkValidationEventArgs> LinkSelecting |
Visual Basic Copy Code |
---|
Public Event LinkSelecting As EventHandler(Of LinkValidationEventArgs) |
LinkSelecting event handlers receive an argument of type LinkValidationEventArgs. The following LinkValidationEventArgs members provide information relevant to the event:
Member name | Description |
---|---|
The DiagramLink that the user is trying to select. | |
A Point specifying the mouse cursor position. | |
The current selection rectangle. |
LinkSelecting is raised in two distinct cases - when the user clicks a link, or while the user is drawing a selection rectangle. When raised because of a mouse click, the MousePosition argument is set to a valid point and the SelectionRectangle argument equals to Rect.Empty. While the user is drawing a selection rectangle, the event is raised for each mouse movement, the SelectionRectangle contains the selection coordinates and the MousePosition parameter equals to a zero point.
LinkSelecting is raised while enumerating all items in the z-order collection, so you cannot change the link's ZIndex while handling this event. A selection-related event suitable for changing the z-order of items is SelectionChanged.
WpfDiagram Programmer's Guide | © 2024 MindFusion |