Search
Diagram.RouteAllLinks Method (DiagramLinkCollection)
See Also
 





Reroutes the specified links.

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

 Syntax

C#  Copy Code

public void RouteAllLinks (
    DiagramLinkCollection linksToRoute
)

Visual Basic  Copy Code

Public Sub RouteAllLinks( _
    linksToRoute As DiagramLinkCollection _
)

 Parameters

linksToRoute

A list of diagram links.

 Remarks

Each link is routed so that it goes the shortest possible way between the nodes it links without crossing any other nodes. To do so, this method might modify the number of link segments. The value of AutoRoute is not considered when RouteAllLinks executes.

Links are routed using current LinkRouter. The default is a CompositeRouter instance that chains PatternRouter and GridRouter. The former applies a few standard link paths, and the latter runs cost-minimization algorithm when more complex paths are necessary.

RoutingOptions allows tuning the GridRouter algorithm. The most important options are the cost values exposed as LengthCost, TurnCost and CrossingCost properties. They greatly influence the shape of the generated route.

 See Also