A validation event that lets you approve or reject connecting a link to an anchor point.
Namespace: MindFusion.Diagramming
Package: MindFusion.Diagramming
C# Copy Code |
---|
public event EventHandler<LinkValidationEventArgs> ValidateAnchorPoint |
Visual Basic Copy Code |
---|
Public Event ValidateAnchorPoint As EventHandler(Of LinkValidationEventArgs) |
ValidateAnchorPoint event handlers receive an argument of type LinkValidationEventArgs. The following LinkValidationEventArgs members provide information relevant to the event:
Member name | Description |
---|---|
The DiagramLink that will be connected to the anchor point. | |
A PointF specifying the mouse cursor position. | |
Index of the adjustment handle that is being moved. | |
A value indicating whether the operation changes the origin of the link. | |
A value indicating whether the operation changes the destination of the link. | |
The DiagramNode to which the link will be connected. | |
Index of an anchor point to which the link will be connected if this event is validated. | |
Set this property to true to prevent connecting the link to specified point. |
This event is raised for each point of an AnchorPattern while a link's end point is being moved over a node. If none of the anchor points are validated, the mouse cursor icon changes to DisallowLinkCursor, indicating that the link cannot be connected to that node.
When the mouse button is released over a node, the event is raised again for the node's anchor points. From all validated anchor points, the one nearest to the dragged link end point is used to dock the link.
NetDiagram Programmer's Guide | © 2023 MindFusion |