Skip to content

Connections Overview

Miroiu Emanuel edited this page Sep 24, 2022 · 7 revisions

Connections are created between two points. The Source and Target dependency properties are of type Point and are usually bound to a connector's Anchor point.

Base connection

The base class for all connections provided by the library is BaseConnection which derives from Shape. There's no restriction to derive from BaseConnection when you create a custom connection.

It exposes two commands with their corresponding events:

  • DisconnectCommand, respectively DisconnectEvent - fired when the connection is clicked while holding ALT
  • SplitCommand, respectively SplitEvent - fired when the connection is double-clicked

The Direction of a connection can have two values:

  • Forward

image image

  • Backward

image image

The SourceOffset and the TargetOffset works together with OffsetMode and will keep the distance from the anchor point:

image

Connections also have a Spacing which will make the connection break the angle at a certain distance from the Source and Target points:

  • With spacing:

image

  • Without spacing:

image

Settings the ArrowSize to "0, 0" will remove the arrow head.

Line connection

Circuit connection

Connection

Pending Connection

Canceling a pending connection is done by releasing the right mouse button.

Clone this wiki locally