Search
DiagramLink Class
Remarks See Also
 






Represents a link between two diagram nodes.

Namespace: MindFusion.Diagramming
Assembly: MindFusion.Diagramming

 Syntax

C#  Copy Code

public class DiagramLink : DiagramItem, InplaceEditable, Routable

Visual Basic  Copy Code

Public Class DiagramLink
    Inherits DiagramItem
    Implements InplaceEditable, Routable

 Remarks

Links between nodes in diagrams are represented by instances of the DiagramLink class. Links connect at most two nodes, which can be accessed with the Origin and Destination properties. If connected to node anchor points, the point indices can be accessed using the OriginAnchor and DestinationAnchor properties. To control whether users are allowed to move link end points, set AllowMoveStart and AllowMoveEnd.

Links are built of smaller parts called segments, which can be straight lines, cascading orthogonal lines or Bézier curves. The type of segments is set through the Shape property. The number of link's segments is specified by the SegmentCount property. Access to control point locations is provided by the ControlPoints collection.

Usually only the starting and ending segments of a link are updated if the nodes it connects are moved around. Number, orientation and/or position of link segments can change dynamically in various ways depending on the values of AutoRoute and Dynamic. For links of style Cascading, the CascadeOrientation property specifies the orientation of their first segments.

Links can display distinct arrowhead shapes at their ends. These shapes can be set with the HeadShape and BaseShape properties. The size of the base and arrowhead images is specified through the HeadShapeSize and BaseShapeSize properties. Arrowhead shapes can be displayed in the middle of each segment to facilitate users by distinguishing different links. The type and size of these shapes is set with the IntermediateShape and IntermediateShapeSize properties. The lines of arowhead shapes are painted using the HeadStroke brush.

The color of link segments can be specified by the Stroke property and the fill color of its base and head shapes with the BaseBrush and HeadBrush properties. The appearance of link's selection handles can be changed using HandlesStyle.

Links can have some text associated with them, displayed as specified via the Text and TextBrush properties. The AddLabel method allows displaying multiple labels per link. Labels can automatically avoid overlapping nodes or other labels when their AutoArrange property is set.

 Inheritance Hierarchy

System.Object
    Windows.UI.Xaml.DependencyObject
        Windows.UI.Xaml.UIElement
            Windows.UI.Xaml.FrameworkElement
                Windows.UI.Xaml.Controls.Control
                    Windows.UI.Xaml.Controls.ContentControl
                        MindFusion.Diagramming.DiagramItem
                            MindFusion.Diagramming.DiagramLink

 See Also