Interface
IConnection

Represents a connection.

Definition

Namespace:Telerik.Windows.Diagrams.Core

Assembly:Telerik.Windows.Diagrams.Core.dll

Syntax:

cs-api-definition
public interface IConnection : IDiagramItem, ISerializable, ISupportMouseOver, IPropertyChanged, IGroupable, ISupportManipulation, ISupportVirtualization, IContainerChild, ICollapsible

Inherited Members IDiagramItem.Initialize(IGraphServiceLocator, IGraphInternal)IDiagramItem.IsEnabledIDiagramItem.IsSelectedIDiagramItem.VisibilityIDiagramItem.ZIndexIDiagramItem.BoundsIDiagramItem.IsDynamicIDiagramItem.IdIDiagramItem.NameIDiagramItem.PositionIDiagramItem.IsInEditModeIDiagramItem.IsEditableIDiagramItem.RenderTransformOriginIDiagramItem.ContentISerializable.Serialize()ISerializable.Deserialize(SerializationInfo)ISupportMouseOver.IsMouseOverIPropertyChanged.PropertyChangedIGroupable.ParentGroupIGroupable.ParentGroupChangedISupportManipulation.IsRotationEnabledISupportManipulation.IsResizingEnabledISupportManipulation.IsDraggingEnabledISupportManipulation.IsConnectorsManipulationEnabledISupportManipulation.IsManipulationAdornerVisibleISupportManipulation.AllowDeleteISupportManipulation.AllowCutISupportManipulation.AllowCopyISupportManipulation.AllowPasteISupportVirtualization.VirtualizationStateIContainerChild.ParentContainerICollapsible.IsCollapsed

Properties

BezierTension

Gets or sets the Bezier tension.

Declaration

cs-api-definition
double BezierTension { get; set; }

Property Value

double

Remarks

A value or zero turns the Bezier connection into a straight line, a value of one and above increase the sharpness of the Bezier curve.

ConnectionPoints

Gets the connection points.

Declaration

cs-api-definition
IList<Point> ConnectionPoints { get; }

Property Value

IList<Point>

Remarks

The positions are absolute coordinates with respect to the canvas.

ConnectionType

Gets or sets the type of the connection.

Declaration

cs-api-definition
ConnectionType ConnectionType { get; set; }

Property Value

ConnectionType

EndPoint

Gets or sets the position of where this connection ends.

Declaration

cs-api-definition
Point EndPoint { get; set; }

Property Value

Point

Geometry

Gets the geometry of the connection.

Declaration

cs-api-definition
Geometry Geometry { get; }

Property Value

Geometry

IsModified

Gets or sets a value indicating whether the default Bezier handles have been altered or an intermediate point have been added/removed.

Declaration

cs-api-definition
bool IsModified { get; set; }

Property Value

bool

Remarks

  • This property is set to true as soon as one of the Bezier handles has been manually modified or the intermediate points have changed. If this property is true the connection routing and the automatic bezier handles are halted. You re-enable this functionality by re-setting this property to false.

ManipulationPoints

Gets the manipulation points (the adorning elements of the connection which allow you to alter an intermediate connection point).

Declaration

cs-api-definition
IList<IConnectionEditPoint> ManipulationPoints { get; }

Property Value

IList<IConnectionEditPoint>

Route

Gets or sets whether this connection will be automatically routed.

Declaration

cs-api-definition
bool Route { get; set; }

Property Value

bool

Remarks

Setting this property effects only Spline and Polyline connections.

Source

Gets or sets the source shape of this connection.

Declaration

cs-api-definition
IShape Source { get; set; }

Property Value

IShape

SourceCapSize

Gets or sets the size of the source cap (source decorator or arrow head).

Declaration

cs-api-definition
Size SourceCapSize { get; set; }

Property Value

Size

SourceCapType

Gets or sets the type of the source cap.

Declaration

cs-api-definition
CapType SourceCapType { get; set; }

Property Value

CapType

The type of the source cap.

SourceConnectorPosition

Gets or sets the position of the source connector.

Declaration

cs-api-definition
string SourceConnectorPosition { get; set; }

Property Value

string

Remarks

By default this is one of the standard position names defined in ConnectorPosition, but if one or more custom connectors are defined on the source shape this can be a custom connector name.

SourceConnectorResult

Gets the actual source connector of this connection if the connector is dynamically assigned (Auto).

Declaration

cs-api-definition
IConnector SourceConnectorResult { get; }

Property Value

IConnector

StartPoint

Gets or sets the position of where this connection starts.

Declaration

cs-api-definition
Point StartPoint { get; set; }

Property Value

Point

Target

Gets or sets the target shape of this connection.

Declaration

cs-api-definition
IShape Target { get; set; }

Property Value

IShape

TargetCapSize

Gets or sets the size of the target cap (target decorator or arrow head).

Declaration

cs-api-definition
Size TargetCapSize { get; set; }

Property Value

Size

TargetCapType

Gets or sets the type of the target cap (target decorator or arrow head).

Declaration

cs-api-definition
CapType TargetCapType { get; set; }

Property Value

CapType

TargetConnectorPosition

Gets or sets the target connector position.

Declaration

cs-api-definition
string TargetConnectorPosition { get; set; }

Property Value

string

Remarks

By default this is one of the standard position names defined in ConnectorPosition, but if one or more custom connectors are defined on the target shape this can be a custom connector name.

TargetConnectorResult

Gets the actual target connector of this connection if the connector is dynamically assigned (Auto).

Declaration

cs-api-definition
IConnector TargetConnectorResult { get; }

Property Value

IConnector

UseFreeConnectors

Gets or sets whether the connection will choose free (not yet used) connector in the source / target shape when the source / target connector position is Auto.

Declaration

cs-api-definition
bool UseFreeConnectors { get; set; }

Property Value

bool

Methods

AddConnectionPoint(Point)

Adds an intermediate connection point.

Declaration

cs-api-definition
void AddConnectionPoint(Point point)

Parameters

point

Point

The (absolute canvas) position at which the new connection point should be added.

Attach(IConnector, IConnector)

Attaches the connection to specific source and target.

Declaration

cs-api-definition
void Attach(IConnector source = null, IConnector target = null)

Parameters

source

IConnector

The source connector to attach to.

target

IConnector

The target connector to attach to.

GetCrossings()

Returns the information related to the crossing of this connection with other connections.

Declaration

cs-api-definition
CrossingsData GetCrossings()

Returns

CrossingsData

InsertConnectionPoint(Point, int)

Inserts the connection point after the specific index.

Declaration

cs-api-definition
void InsertConnectionPoint(Point point, int after)

Parameters

point

Point

The point to add.

after

int

The index after which it will be positioned.

Remarks

The zero-position corresponds to the source points, the first position is the first intermediate point and the last index is the target point.

Update(bool)

Updates this connection.

Declaration

cs-api-definition
void Update(bool isManipulating = false)

Parameters

isManipulating

bool

Should be set to true if any of the manipulation services (for instance RotationService, DraggingService) is active as a result of a user action.

UpdateDeferredGeometry(Point, Point, Point[])

Updates the deferred geometry.

Declaration

cs-api-definition
void UpdateDeferredGeometry(Point startPoint, Point endPoint, Point[] middlePoints)

Parameters

startPoint

Point

The start point.

endPoint

Point

The end point.

middlePoints

Point[]

The middle points.

Events

ManipulationPointActivated

Occurs when a manipulation point (an adorner of the connection which allows you to alter an intermediate connection point) is activated.

Declaration

cs-api-definition
event EventHandler<ManipulationPointActivatedEventArgs<IConnectionEditPoint>> ManipulationPointActivated

Event Value

EventHandler<ManipulationPointActivatedEventArgs<IConnectionEditPoint>>

Extension Methods