InterfaceIConnection
Represents a connection.
Definition
Namespace:Telerik.Windows.Diagrams.Core
Assembly:Telerik.Windows.Diagrams.Core.dll
Syntax:
public interface IConnection : IDiagramItem, ISerializable, ISupportMouseOver, IPropertyChanged, IGroupable, ISupportManipulation, ISupportVirtualization, IContainerChild, ICollapsible
Inherited Members
Properties
BezierTension
Gets or sets the Bezier tension.
Declaration
double BezierTension { get; set; }
Property Value
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
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
ConnectionType ConnectionType { get; set; }
Property Value
EndPoint
Gets or sets the position of where this connection ends.
Declaration
Point EndPoint { get; set; }
Property Value
Point
Geometry
Gets the geometry of the connection.
Declaration
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
bool IsModified { get; set; }
Property Value
Remarks
- This property is set to
trueas soon as one of the Bezier handles has been manually modified or the intermediate points have changed. If this property istruethe connection routing and the automatic bezier handles are halted. You re-enable this functionality by re-setting this property tofalse.
ManipulationPoints
Gets the manipulation points (the adorning elements of the connection which allow you to alter an intermediate connection point).
Declaration
IList<IConnectionEditPoint> ManipulationPoints { get; }
Property Value
Route
Gets or sets whether this connection will be automatically routed.
Source
Gets or sets the source shape of this connection.
SourceCapSize
Gets or sets the size of the source cap (source decorator or arrow head).
Declaration
Size SourceCapSize { get; set; }
Property Value
Size
SourceCapType
Gets or sets the type of the source cap.
Declaration
CapType SourceCapType { get; set; }
Property Value
The type of the source cap.
SourceConnectorPosition
Gets or sets the position of the source connector.
Declaration
string SourceConnectorPosition { get; set; }
Property Value
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).
StartPoint
Gets or sets the position of where this connection starts.
Declaration
Point StartPoint { get; set; }
Property Value
Point
Target
Gets or sets the target shape of this connection.
TargetCapSize
Gets or sets the size of the target cap (target decorator or arrow head).
Declaration
Size TargetCapSize { get; set; }
Property Value
Size
TargetCapType
Gets or sets the type of the target cap (target decorator or arrow head).
TargetConnectorPosition
Gets or sets the target connector position.
Declaration
string TargetConnectorPosition { get; set; }
Property Value
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).
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.
Methods
AddConnectionPoint(Point)
Adds an intermediate connection point.
Declaration
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
void Attach(IConnector source = null, IConnector target = null)
Parameters
source
The source connector to attach to.
target
The target connector to attach to.
GetCrossings()
Returns the information related to the crossing of this connection with other connections.
InsertConnectionPoint(Point, int)
Inserts the connection point after the specific index.
Declaration
void InsertConnectionPoint(Point point, int after)
Parameters
point
Point
The point to add.
after
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
void Update(bool isManipulating = false)
Parameters
isManipulating
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
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
event EventHandler<ManipulationPointActivatedEventArgs<IConnectionEditPoint>> ManipulationPointActivated
Event Value
EventHandler<ManipulationPointActivatedEventArgs<IConnectionEditPoint>>