ASP.NET Pack Programmer's Guide
DiagramBase.ValidateAnchorPoint Event
See Also
 





A validation event that lets you approve or reject connecting a link to an anchor point.

Namespace: MindFusion.Diagramming
Package: MindFusion.Diagramming

 Syntax

C#  Copy Code

public event EventHandler<LinkValidationEventArgs> ValidateAnchorPoint

Visual Basic  Copy Code

Public Event ValidateAnchorPoint As EventHandler(Of LinkValidationEventArgs)

 Event Data

ValidateAnchorPoint event handlers receive an argument of type LinkValidationEventArgs. The following LinkValidationEventArgs members provide information relevant to the event:

Member name

Description

Link

The DiagramLink that will be connected to the anchor point.

MousePosition

A PointF specifying the mouse cursor position.

AdjustmentHandle

Index of the adjustment handle that is being moved.

ChangingOrigin

A value indicating whether the operation changes the origin of the link.

ChangingDestination

A value indicating whether the operation changes the destination of the link.

Node

The DiagramNode to which the link will be connected.

AnchorIndex

Index of an anchor point to which the link will be connected if this event is validated.

Cancel

Set this property to true to prevent connecting the link to specified point.

 Remarks

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.

 See Also

DiagramBase Members
DiagramBase Class
MindFusion.Diagramming Namespace