RadDiagramConnection
The RadDiagramConnection is a special ContentControl that serves as a connection between zero, one or two shapes.
Definition
Namespace:Telerik.Windows.Controls
Assembly:Telerik.Windows.Controls.Diagrams.dll
Syntax:
[Themable]
[TelerikToolboxCategory("Diagram")]
public class RadDiagramConnection : RadDiagramItem, IConnection, IDiagramItem, ISerializable, ISupportMouseOver, IPropertyChanged, IGroupable, ISupportManipulation, ISupportVirtualization, IContainerChild, ICollapsible
Inheritance: objectRadDiagramItemRadDiagramConnection
Implements:
Inherited Members
Constructors
Initializes a new instance of the RadDiagramConnection class.
public RadDiagramConnection()
Fields
BezierTensionProperty
DependencyProperty
Identifies the BezierTensionProperty dependency property.
public static readonly DependencyProperty BezierTensionProperty
ConnectionTypeProperty
DependencyProperty
Identifies the ConnectionType dependency property.
public static readonly DependencyProperty ConnectionTypeProperty
EndPointProperty
DependencyProperty
Identifies the EndPoint dependency property.
public static readonly DependencyProperty EndPointProperty
IsAutoUpdateSuppressedProperty
DependencyProperty
Identifies the IsAutoUpdateSuppressedProperty.
public static readonly DependencyProperty IsAutoUpdateSuppressedProperty
RouteProperty
DependencyProperty
Identifies the RouteProperty property.
public static readonly DependencyProperty RouteProperty
SourceCapSizeProperty
DependencyProperty
Identifies the SourceCapSize dependency property.
public static readonly DependencyProperty SourceCapSizeProperty
SourceCapTypeProperty
DependencyProperty
Identifies the SourceCapType dependency property.
public static readonly DependencyProperty SourceCapTypeProperty
SourceConnectorPositionProperty
DependencyProperty
Identifies the SourceConnectorPosition dependency property.
public static readonly DependencyProperty SourceConnectorPositionProperty
SourceProperty
DependencyProperty
Identifies the Source dependency property.
public static readonly DependencyProperty SourceProperty
StartPointProperty
DependencyProperty
Identifies the StartPoint dependency property.
public static readonly DependencyProperty StartPointProperty
TargetCapSizeProperty
DependencyProperty
Identifies the TargetCapSize dependency property.
public static readonly DependencyProperty TargetCapSizeProperty
TargetCapTypeProperty
DependencyProperty
Identifies the TargetCapType dependency property.
public static readonly DependencyProperty TargetCapTypeProperty
TargetConnectorPositionProperty
DependencyProperty
Identifies the TargetConnectorPosition dependency property.
public static readonly DependencyProperty TargetConnectorPositionProperty
TargetProperty
DependencyProperty
Identifies the TargetProperty dependency property.
public static readonly DependencyProperty TargetProperty
UseFreeConnectorsProperty
DependencyProperty
Identifies the UseFreeConnectors property.
public static readonly DependencyProperty UseFreeConnectorsProperty
Properties
The connection adorner which helps manipulating this connection.
public ConnectionManipulationAdorner Adorner { get; set; }
Gets or sets the Bezier tension.
public double BezierTension { get; set; }
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.
Implements:
Bounds
Rect
Gets the bounds.
public override Rect Bounds { get; }
The bounds.
Overrides:
Implements:
ConnectionPoints
IList<Point>
Gets the connection points of the connection.
public IList<Point> ConnectionPoints { get; }
Implements:
The positions are absolute coordinates with respect to the canvas.
Gets or sets the type of the connection.
public ConnectionType ConnectionType { get; set; }
The type of the connection.
Implements:
EndPoint
Point
Gets or sets the position of where this connection ends.
public Point EndPoint { get; set; }
Implements:
Geometry
Geometry
Gets the geometry of the connection.
public Geometry Geometry { get; }
Implements:
Gets or sets a value indicating whether the connection has been modified.
public bool IsModified { get; set; }
Implements:
- This property is set to
trueas soon as you add/remove intermediate points or manually move one of the Bezier handles. This means that the automatically calculated handle positions in function of the connector will be halted. You re-enable this auto-handle calculation by re-setting this property tofalse. - If this property is
truethe connection won't be routed and no automatic reflexive points will be added. You can re-enable this by re-setting this property tofalse.
Gets the manipulation points, which are equal to the adorner's connection editing points.
public IList<IConnectionEditPoint> ManipulationPoints { get; }
Implements:
Gets the number of segments this connection has.
public int SegmentCount { get; }
Gets or sets the source.
public IShape Source { get; set; }
The source.
Implements:
SourceCapSize
Size
Gets or sets the size of the source cap.
public Size SourceCapSize { get; set; }
The size of the source cap.
Implements:
Gets or sets the type of the source cap.
public CapType SourceCapType { get; set; }
The type of the source cap.
Implements:
Gets or sets the source connector position.
public string SourceConnectorPosition { get; set; }
The source connector position.
Implements:
Gets the source connector result.
public IConnector SourceConnectorResult { get; }
Implements:
StartPoint
Point
Gets or sets the position of where this connection starts.
public Point StartPoint { get; set; }
Implements:
Gets or sets the target.
public IShape Target { get; set; }
The target.
Implements:
TargetCapSize
Size
Gets or sets the size of the target cap.
public Size TargetCapSize { get; set; }
The size of the target cap.
Implements:
Gets or sets the type of the target cap.
public CapType TargetCapType { get; set; }
The type of the target cap.
Implements:
Gets or sets the target connector position.
public string TargetConnectorPosition { get; set; }
The target connector position.
Implements:
Gets the target connector result.
public IConnector TargetConnectorResult { get; }
Implements:
Gets or sets whether this connection will choose free connectors when attaching to shape with Source or TargetConnectorPosition Auto.
public bool UseFreeConnectors { get; set; }
Implements:
Methods
Adds an intermediate connection point.
public void AddConnectionPoint(Point point)
The (absolute canvas) position at which the new connection point should be added.
Implements:
Attaches the connection to specific source and target.
public void Attach(IConnector source = null, IConnector target = null)
The source.
targetIConnectorThe target.
Implements:
Invoked on connection type changed.
protected virtual void ConnectionTypeChanged(ConnectionType newValue, ConnectionType oldValue)
The new value.
oldValueConnectionTypeThe old value.
CreateGeometry(BridgeType, bool)
Geometry
Creates the connection's geometry.
protected virtual Geometry CreateGeometry(BridgeType bridgeType, bool roundedCorners)
Geometry
Creates the source cap geometry.
protected virtual PathFigure CreateSourceCapGeometry(Point startPoint, Point endPoint, ref Point baseLineStart)
The start point.
endPointPointThe end point.
baseLineStartPointThe new start of the base line.
Returns:PathFigure
Creates the target cap geometry.
protected virtual PathFigure CreateTargetCapGeometry(Point startPoint, Point endPoint, ref Point baseLineEnd)
The start point.
endPointPointThe end point.
baseLineEndPointThe new end of the base line.
Returns:PathFigure
Deserializes the serialization info in this diagram entity.
public override void Deserialize(SerializationInfo info)
A SerializationInfo instance.
Overrides:
Implements:
Returns all connections below or above the current connection that intersect with the given bounds.
public IList<IConnection> FetchZConnections(bool below, Rect? bounds = null)
If set to true the connections below current one will be returned, otherwise the ones above.
The bounds. If null the connection's Bounds are used.
Returns:Returns the information related to the crossing of this connection with other connections.
public CrossingsData GetCrossings()
Implements:
- The positions in the returned data are local coordinates with respect to the bounding rectangle of this connection.
- The returned data contains a collection of points for each segment. This collection starts with the startpoint of the segment and ends with the endpoint of the segment. If there is a gap or crossing then for each gap a pair of points will denote the begin/end of the gap. So, each segment collection has always at least two points.
Gets the IsUpdateNeeded.
public static bool GetIsAutoUpdateSuppressed(DependencyObject obj)
Inserts the connection point after the specific index.
public void InsertConnectionPoint(Point point, int after)
The point to add.
afterintThe index after which it will be positioned.
Implements:
The zero-position corresponds to the source points, the first position is the first intermediate point and the last index is the target point.
When overridden in a derived class, is invoked whenever application code or internal processes (such as a rebuilding layout pass) call . In simplest terms, this means the method is called just before a UI element displays in an application. For more information, see Remarks.
public override void OnApplyTemplate()
Overrides:
OnCreateAutomationPeer()
AutomationPeer
Creates a peer associated with this object.
protected override AutomationPeer OnCreateAutomationPeer()
AutomationPeer
An instance of the .
Overrides:
Called on end point changed.
protected virtual void OnEndPointChanged(Point newValue, Point oldValue)
The new value.
oldValuePointThe old value.
This virtual method in called when IsInitialized is set to true and it raises an Initialized event.
Called when [position coerced].
protected override object OnPositionCoerced(Point position)
The new position.
Returns:Overrides:
Called when the source of the RadDiagramConnection is changed.
protected virtual void OnSourceChanged()
Called on start point changed.
protected virtual void OnStartPointChanged(Point newValue, Point oldValue)
The new value.
oldValuePointThe old value.
Invoked when the StrokeThickness property has changed.
protected override void OnStrokeThicknessChanged()
Overrides:
Called when the target of the RadDiagramConnection is changed.
protected virtual void OnTargetChanged()
When overridden, positions the editing element for the RadDiagramConnection.
protected virtual void PositionEditElementOverride()
Refreshes the is selected in group property.
protected override void RefreshIsSelectedInGroup()
Overrides:
Serializes this instance.
Sets the Bezier handle positions. The coordinates are absolute coordinates with respect to the diagramming surface.
public void SetBezierHandles(Point startHandle, Point endHandle)
The start handle position.
endHandlePointThe end handle position.
Exceptions:The connection is not a Bezier connection and has no handles.
Sets the IsUpdateNeeded.
public static void SetIsAutoUpdateSuppressed(DependencyObject obj, bool value)
Updates this instance.
Updates the deferred geometry.
protected virtual void UpdateDeferredGeometry(Point start, Point end, Point[] points)
The start point of the connection.
endPointThe end point of the connection.
pointsPoint[]The intermediate connection points.
When overridden, provides the geometry for the connection.
protected virtual void UpdateGeometryOverride()
This is called whenever the connection is redrawn.
Events
Occurs when a manipulation point of the RadDiagramConnection is activated.
public event EventHandler<ManipulationPointActivatedEventArgs<IConnectionEditPoint>> ManipulationPointActivated
Implements: