Raised when the user tries to select a node, this event lets you cancel the operation.
Namespace: MindFusion.Diagramming
Package: MindFusion.Diagramming
C# Copy Code |
---|
public event EventHandler<NodeValidationEventArgs> NodeSelecting |
Visual Basic Copy Code |
---|
Public Event NodeSelecting As EventHandler(Of NodeValidationEventArgs) |
NodeSelecting event handlers receive an argument of type NodeValidationEventArgs. The following NodeValidationEventArgs members provide information relevant to the event:
Member name | Description |
---|---|
The DiagramNode that the user is trying to select. | |
A PointF specifying the mouse cursor position. | |
The current selection rectangle. |
NodeSelecting is raised in two distinct cases - when the user clicks a node, 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 RectangleF.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 PointF.Empty.
NodeSelecting is raised while enumerating all items in the z-order collection, so you cannot change the node's ZIndex while handling this event. A selection-related event suitable for changing the z-order of items is SelectionChanged.
NetDiagram Programmer's Guide | © 2023 MindFusion |