Table of Contents

Class EdgeRoutingOptions

Namespace
FlowGraph.Core.Routing
Assembly
FlowGraph.Core.dll

Configuration options for edge routing behavior.

public class EdgeRoutingOptions
Inheritance
EdgeRoutingOptions
Inherited Members

Examples

var options = new EdgeRoutingOptions
{
    CornerRadius = 15,
    EndSegmentLength = 60,
    EdgeSpacing = 10,
    SpreadEdgesOnPort = true
};

// Apply to canvas settings
canvas.Settings.RoutingOptions = options;

Remarks

EdgeRoutingOptions controls how edges are routed between nodes. Different routers may use different subsets of these options based on their capabilities.

For Community edition:

For Pro edition (additional options):

Properties

AvoidsNodes

Whether edges should route around other nodes to avoid overlap. Default is false (Pro feature).

public bool AvoidsNodes { get; set; }

Property Value

bool

Remarks

When true, the router will attempt to find paths that don't pass through other nodes in the graph. This is a Pro feature.

Similar to GoJS's Routing.AvoidsNodes option.

CornerRadius

Corner radius for Step and SmoothStep edges. Controls how rounded the corners are at direction changes. Default is 10 pixels.

public double CornerRadius { get; set; }

Property Value

double

Remarks

For Step edges, corners are always sharp (90°). For SmoothStep edges, this value determines the arc radius.

The actual radius is clamped to not exceed half the segment length, ensuring corners don't overlap.

CrossingRadius

Radius for JumpOver and JumpGap crossing styles. Default is 8 pixels.

public double CrossingRadius { get; set; }

Property Value

double

CrossingStyle

How to render edge crossings. Default is None (Pro feature).

public EdgeCrossingStyle CrossingStyle { get; set; }

Property Value

EdgeCrossingStyle

Remarks

When edges cross each other, this option determines the visual treatment:

  • None - Edges simply cross (default)
  • JumpOver - Arc over the crossing edge
  • JumpGap - Small gap at the crossing point

Similar to GoJS's Curve.JumpOver and Curve.JumpGap options.

Default

Default routing options instance.

public static EdgeRoutingOptions Default { get; }

Property Value

EdgeRoutingOptions

EdgeSpacing

Spacing between multiple edges connecting to the same port side. Default is 8 pixels.

public double EdgeSpacing { get; set; }

Property Value

double

Remarks

When multiple edges connect to the same side of a node (e.g., all from the right), this value determines how far apart they are spread vertically or horizontally.

Similar to GoJS's fromSpot/toSpot spreading behavior.

EndSegmentLength

Minimum distance from the port before the edge can make its first turn. Default is 50 pixels.

public double EndSegmentLength { get; set; }

Property Value

double

Remarks

This creates a "stem" coming out of the port before the edge can bend. Helps prevent awkward curves that turn immediately at the node boundary.

Similar to GoJS's fromEndSegmentLength and toEndSegmentLength properties.

NodePadding

Padding around nodes for obstacle avoidance routing. Default is 10 pixels.

public double NodePadding { get; set; }

Property Value

double

Remarks

When routing edges around nodes, this padding ensures edges don't pass too close to node boundaries.

Only used by routers that support obstacle avoidance (SmartBezier, AStar).

SpreadEdgesOnPort

Whether to automatically spread multiple edges from the same port side. Default is true.

public bool SpreadEdgesOnPort { get; set; }

Property Value

bool

Remarks

When true, if three edges all connect to the right side of a node, they will be spread vertically to avoid overlap.

When false, all edges from the same side will connect at the same point.

Methods

Clone()

Creates a copy of these options.

public EdgeRoutingOptions Clone()

Returns

EdgeRoutingOptions