Search
DiagramBase.LinkCreating Event
See Also
 





A validation event raised while the user is drawing a new link.

Namespace: MindFusion.Diagramming.Wpf
Assembly: MindFusion.Diagramming.Wpf

 Syntax

C#  Copy Code

public event EventHandler<LinkValidationEventArgs> LinkCreating

Visual Basic  Copy Code

Public Event LinkCreating As EventHandler(Of LinkValidationEventArgs)

 Event Data

LinkCreating 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 is being created.

MousePosition

A Point specifying the mouse cursor position.

Destination

The DiagramNode that will be set as the link's Destination if this event is validated.

AnchorIndex

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

TableRow

Index of the table row to which the link will be connected if this event is validated.

Cancel

Set this property to true to prevent the user from creating the link at the current location. That displays the Stop mouse cursor and releasing the button will cancel the operation.

CancelDrag

Call this method to immediately stop the link creation.

 Remarks

LinkCreating is raised after each mouse movement while drawing a new link. Setting Cancel to true will change the mouse cursor to DisallowCursor (a Stop icon by default). The event is raised once again when the mouse button is released. Setting Cancel to true in that case will cancel the link creation.

 See Also