Class RadDiagramConnection
The RadDiagramConnection is a special ContentControl that serves as a connection between zero, one or two shapes.
Inheritance
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.RadDiagram.dll
Syntax
public class RadDiagramConnection : RadDiagramItem, IDisposable, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IStylableNode, ISupportDrop, IConnection, IDiagramItem, ISerializable, ISupportMouseOver, IPropertyChanged, IGroupable, ISupportManipulation, ISupportVirtualization, IContainerChild, ICollapsible
Constructors
RadDiagramConnection()
Initializes a new instance of the RadDiagramConnection class.
Declaration
public RadDiagramConnection()
Fields
BezierTensionProperty
Identifies the BezierTensionProperty dependency property.
Declaration
public static readonly RadProperty BezierTensionProperty
Field Value
RadProperty
|
ConnectionTypeProperty
Identifies the ConnectionType dependency property.
Declaration
public static readonly RadProperty ConnectionTypeProperty
Field Value
RadProperty
|
ConnectorCenterPointProperty
Identifies the ConnectorCenterPoint.
Declaration
public static readonly RadProperty ConnectorCenterPointProperty
Field Value
RadProperty
|
EndPointProperty
Identifies the EndPoint dependency property.
Declaration
public static readonly RadProperty EndPointProperty
Field Value
RadProperty
|
IsAutoUpdateSuppressedProperty
Identifies the IsAutoUpdateSuppressedProperty.
Declaration
public static readonly RadProperty IsAutoUpdateSuppressedProperty
Field Value
RadProperty
|
RouteProperty
Identifies the RouteProperty property.
Declaration
public static readonly RadProperty RouteProperty
Field Value
RadProperty
|
SourceCapSizeProperty
Identifies the SourceCapSize dependency property.
Declaration
public static readonly RadProperty SourceCapSizeProperty
Field Value
RadProperty
|
SourceCapTypeProperty
Identifies the SourceCapType dependency property.
Declaration
public static readonly RadProperty SourceCapTypeProperty
Field Value
RadProperty
|
SourceConnectorPositionProperty
Identifies the SourceConnectorPosition dependency property.
Declaration
public static readonly RadProperty SourceConnectorPositionProperty
Field Value
RadProperty
|
SourceProperty
Identifies the Source dependency property.
Declaration
public static readonly RadProperty SourceProperty
Field Value
RadProperty
|
StartPointProperty
Identifies the StartPoint dependency property.
Declaration
public static readonly RadProperty StartPointProperty
Field Value
RadProperty
|
TargetCapSizeProperty
Identifies the TargetCapSize dependency property.
Declaration
public static readonly RadProperty TargetCapSizeProperty
Field Value
RadProperty
|
TargetCapTypeProperty
Identifies the TargetCapType dependency property.
Declaration
public static readonly RadProperty TargetCapTypeProperty
Field Value
RadProperty
|
TargetConnectorPositionProperty
Identifies the TargetConnectorPosition dependency property.
Declaration
public static readonly RadProperty TargetConnectorPositionProperty
Field Value
RadProperty
|
TargetProperty
Identifies the TargetProperty dependency property.
Declaration
public static readonly RadProperty TargetProperty
Field Value
RadProperty
|
UseFreeConnectorsProperty
Identifies the UseFreeConnectors property.
Declaration
public static readonly RadProperty UseFreeConnectorsProperty
Field Value
RadProperty
|
Properties
Adorner
The connection adorner which helps manipulating this connection.
Declaration
public ConnectionManipulationAdorner Adorner { get; set; }
Property Value
ConnectionManipulationAdorner
|
BezierTension
Gets or sets the Bezier tension.
Declaration
public double BezierTension { get; set; }
Property Value
System.Double
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
Gets the bounds.
Declaration
public override Rect Bounds { get; }
Property Value
Rect
The bounds. |
Overrides
Implements
BoundsWithoutTransform
ConnectionPoints
Gets the connection points of the connection.
Declaration
public IList<Point> ConnectionPoints { get; }
Property Value
System.Collections.Generic.IList<Point>
|
Implements
Remarks
The positions are absolute coordinates with respect to the canvas.
ConnectionType
Gets or sets the type of the connection.
Declaration
public ConnectionType ConnectionType { get; set; }
Property Value
ConnectionType
The type of the connection. |
Implements
EndPoint
Gets or sets the position of where this connection ends.
Declaration
public Point EndPoint { get; set; }
Property Value
Point
|
Implements
ForeColor
Declaration
public override Color ForeColor { get; set; }
Property Value
System.Drawing.Color
|
Overrides
Geometry
Gets the geometry of the connection.
Declaration
public Geometry Geometry { get; }
Property Value
Geometry
|
Implements
IsModified
Gets or sets a value indicating whether the connection has been modified.
Declaration
public bool IsModified { get; set; }
Property Value
System.Boolean
|
Implements
Remarks
ManipulationPoints
Gets the manipulation points, which are equal to the adorner's connection editing points.
Declaration
public IList<IConnectionEditPoint> ManipulationPoints { get; }
Property Value
System.Collections.Generic.IList<IConnectionEditPoint>
|
Implements
Route
Gets or sets whether this connection will be automatically routed.
Declaration
public bool Route { get; set; }
Property Value
System.Boolean
|
Implements
Remarks
SegmentCount
Gets the number of segments this connection has.
Declaration
public int SegmentCount { get; }
Property Value
System.Int32
|
Shape
Source
Gets or sets the source.
Declaration
public IShape Source { get; set; }
Property Value
IShape
The source. |
Implements
SourceCapSize
Gets or sets the size of the source cap.
Declaration
public SizeF SourceCapSize { get; set; }
Property Value
System.Drawing.SizeF
The size of the source cap. |
Implements
SourceCapType
Gets or sets the type of the source cap.
Declaration
public CapType SourceCapType { get; set; }
Property Value
CapType
The type of the source cap. |
Implements
SourceConnectorPosition
Gets or sets the source connector position.
Declaration
public string SourceConnectorPosition { get; set; }
Property Value
System.String
The source connector position. |
Implements
SourceConnectorResult
Gets the source connector result.
Declaration
public IConnector SourceConnectorResult { get; }
Property Value
IConnector
|
Implements
StartPoint
Gets or sets the position of where this connection starts.
Declaration
public Point StartPoint { get; set; }
Property Value
Point
|
Implements
Stroke
Declaration
public override Brush Stroke { get; set; }
Property Value
System.Drawing.Brush
|
Overrides
Target
Gets or sets the target.
Declaration
public IShape Target { get; set; }
Property Value
IShape
The target. |
Implements
TargetCapSize
Gets or sets the size of the target cap.
Declaration
public SizeF TargetCapSize { get; set; }
Property Value
System.Drawing.SizeF
The size of the target cap. |
Implements
TargetCapType
Gets or sets the type of the target cap.
Declaration
public CapType TargetCapType { get; set; }
Property Value
CapType
The type of the target cap. |
Implements
TargetConnectorPosition
Gets or sets the target connector position.
Declaration
public string TargetConnectorPosition { get; set; }
Property Value
System.String
The target connector position. |
Implements
TargetConnectorResult
Gets the target connector result.
Declaration
public IConnector TargetConnectorResult { get; }
Property Value
IConnector
|
Implements
UseFreeConnectors
Gets or sets whether this connection will choose free connectors when attaching to shape with Source or TargetConnectorPosition Auto.
Declaration
public bool UseFreeConnectors { get; set; }
Property Value
System.Boolean
|
Implements
Methods
AddConnectionPoint(Point)
Adds an intermediate connection point.
Declaration
public void AddConnectionPoint(Point point)
Parameters
Point
point
The (absolute canvas) position at which the new connection point should be added. |
Implements
Attach(IConnector, IConnector)
Attaches the connection to specific source and target.
Declaration
public void Attach(IConnector source = null, IConnector target = null)
Parameters
IConnector
source
The source. |
IConnector
target
The target. |
Implements
ConnectionTypeChanged(ConnectionType, ConnectionType)
Invoked on connection type changed.
Declaration
protected virtual void ConnectionTypeChanged(ConnectionType newValue, ConnectionType oldValue)
Parameters
ConnectionType
newValue
The new value. |
ConnectionType
oldValue
The old value. |
CreateChildElements()
CreateGeometry(BridgeType, Boolean)
Creates the connection's geometry.
Declaration
protected virtual Geometry CreateGeometry(BridgeType bridgeType, bool roundedCorners)
Parameters
BridgeType
bridgeType
|
System.Boolean
roundedCorners
|
Returns
Geometry
|
CreateSourceCapGeometry(Point, Point, ref Point)
Creates the source cap geometry.
Declaration
protected virtual PathFigure CreateSourceCapGeometry(Point startPoint, Point endPoint, ref Point baseLineStart)
Parameters
Point
startPoint
The start point. |
Point
endPoint
The end point. |
Point
baseLineStart
The new start of the base line. |
Returns
PathFigure
|
CreateTargetCapGeometry(Point, Point, ref Point)
Creates the target cap geometry.
Declaration
protected virtual PathFigure CreateTargetCapGeometry(Point startPoint, Point endPoint, ref Point baseLineEnd)
Parameters
Point
startPoint
The start point. |
Point
endPoint
The end point. |
Point
baseLineEnd
The new end of the base line. |
Returns
PathFigure
|
Deserialize(SerializationInfo)
Deserializes the serialization info in this diagram entity.
Declaration
public override void Deserialize(SerializationInfo info)
Parameters
SerializationInfo
info
A SerializationInfo instance. |
Overrides
Implements
FetchZConnections(Boolean, Nullable<Rect>)
Returns all connections below or above the current connection that intersect with the given bounds.
Declaration
public IList<IConnection> FetchZConnections(bool below, Rect? bounds = default(Rect? ))
Parameters
System.Boolean
below
If set to |
System.Nullable<Rect>
bounds
The bounds. If null the connection's Bounds are used. |
Returns
System.Collections.Generic.IList<IConnection>
|
GetConnectorCenterPoint(RadObject)
Sets the ConnectorCenterPoint.
Declaration
public static Point GetConnectorCenterPoint(RadObject obj)
Parameters
RadObject
obj
|
Returns
Point
|
GetCrossings()
Returns the information related to the crossing of this connection with other connections.
Declaration
public CrossingsData GetCrossings()
Returns
CrossingsData
|
Implements
Remarks
GetIsAutoUpdateSuppressed(RadObject)
Gets the IsUpdateNeeded.
Declaration
public static bool GetIsAutoUpdateSuppressed(RadObject obj)
Parameters
RadObject
obj
|
Returns
System.Boolean
|
HitTest(Point)
Declaration
public override bool HitTest(Point point)
Parameters
System.Drawing.Point
point
|
Returns
System.Boolean
|
Overrides
InsertConnectionPoint(Point, Int32)
Inserts the connection point after the specific index.
Declaration
public void InsertConnectionPoint(Point point, int after)
Parameters
Point
point
The point to add. |
System.Int32
after
The index after which it will be positioned. |
Implements
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.
MeasureOverride(SizeF)
Declaration
protected override SizeF MeasureOverride(SizeF availableSize)
Parameters
System.Drawing.SizeF
availableSize
|
Returns
System.Drawing.SizeF
|
Overrides
OnApplyTemplate()
When overridden in a derived class, is invoked whenever application code or internal processes (such as a rebuilding layout pass) call System.Windows.Controls.Control.ApplyTemplate. In simplest terms, this means the method is called just before a UI element displays in an application. For more information, see Remarks.
Declaration
public override void OnApplyTemplate()
Overrides
OnEndPointChanged(Point, Point)
Called on end point changed.
Declaration
protected virtual void OnEndPointChanged(Point newValue, Point oldValue)
Parameters
Point
newValue
The new value. |
Point
oldValue
The old value. |
OnIsConnectorsManipulationEnabledChanged(Boolean, Boolean)
Called when connectors manipulation changes.
Declaration
protected override void OnIsConnectorsManipulationEnabledChanged(bool newValue, bool oldValue)
Parameters
System.Boolean
newValue
The new value. |
System.Boolean
oldValue
The old value. |
Overrides
OnIsInEditModeChanged(Boolean, Boolean)
Called when IsInEditMode changes.
Declaration
protected override void OnIsInEditModeChanged(bool oldIsInEditMode, bool isInEditMode)
Parameters
System.Boolean
oldIsInEditMode
The old value of the property. |
System.Boolean
isInEditMode
The current value of the property. |
Overrides
OnIsSelectedChanged(Boolean, Boolean)
Called when the IsSelected property has changed.
Declaration
protected override void OnIsSelectedChanged(bool oldValue, bool newValue)
Parameters
System.Boolean
oldValue
The old value of the IsSelected property. |
System.Boolean
newValue
The new value of the IsSelected property. |
Overrides
OnLoaded()
OnPositionCoerced(Point)
Called when [position coerced].
Declaration
protected override object OnPositionCoerced(Point position)
Parameters
Point
position
The new position. |
Returns
System.Object
|
Overrides
OnPropertyChanged(RadPropertyChangedEventArgs)
Declaration
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
Parameters
RadPropertyChangedEventArgs
e
|
Overrides
OnRouteChanged(Boolean, Boolean)
Called when route changed property change.
Declaration
protected virtual void OnRouteChanged(bool newValue, bool oldValue)
Parameters
System.Boolean
newValue
The new value. |
System.Boolean
oldValue
The old value. |
OnSourceChanged()
Called when the source of the RadDiagramConnection is changed.
Declaration
protected virtual void OnSourceChanged()
OnSourceConnectorPositionChanged(String, String)
Called when on source connector position changed.
Declaration
protected virtual void OnSourceConnectorPositionChanged(string newPosition, string oldPosition)
Parameters
System.String
newPosition
The new position. |
System.String
oldPosition
The old position. |
OnStartPointChanged(Point, Point)
Called on start point changed.
Declaration
protected virtual void OnStartPointChanged(Point newValue, Point oldValue)
Parameters
Point
newValue
The new value. |
Point
oldValue
The old value. |
OnStrokeThicknessChanged()
Invoked when the StrokeThickness property has changed.
Declaration
protected override void OnStrokeThicknessChanged()
Overrides
OnTargetChanged()
Called when the target of the RadDiagramConnection is changed.
Declaration
protected virtual void OnTargetChanged()
OnTargetConnectorPositionChanged(String, String)
Called when on target connector position changed.
Declaration
protected virtual void OnTargetConnectorPositionChanged(string newPosition, string oldPosition)
Parameters
System.String
newPosition
The new position. |
System.String
oldPosition
The old position. |
OnZIndexChanged(Int32, Int32)
Called when the ZIndex changes.
Declaration
protected override void OnZIndexChanged(int newValue, int oldValue)
Parameters
System.Int32
newValue
The new value. |
System.Int32
oldValue
The old value. |
Overrides
PaintElement(IGraphics, Single, SizeF)
Declaration
protected override void PaintElement(IGraphics graphics, float angle, SizeF scale)
Parameters
IGraphics
graphics
|
System.Single
angle
|
System.Drawing.SizeF
scale
|
Overrides
PositionEditElementOverride()
When overridden, positions the editing element for the RadDiagramConnection.
Declaration
protected virtual void PositionEditElementOverride()
RefreshIsSelectedInGroup()
Refreshes the is selected in group property.
Declaration
protected override void RefreshIsSelectedInGroup()
Overrides
Serialize()
Serializes this instance.
Declaration
public override SerializationInfo Serialize()
Returns
SerializationInfo
|
Overrides
Implements
SetBezierHandles(Point, Point)
Sets the Bezier handle positions. The coordinates are absolute coordinates with respect to the diagramming surface.
Declaration
public void SetBezierHandles(Point startHandle, Point endHandle)
Parameters
Point
startHandle
The start handle position. |
Point
endHandle
The end handle position. |
Exceptions
System.Exception
The connection is not a Bezier connection and has no handles. |
SetConnectorCenterPoint(RadObject, Point)
Sets the ConnectorCenterPoint.
Declaration
public static void SetConnectorCenterPoint(RadObject obj, Point value)
Parameters
RadObject
obj
|
Point
value
|
SetIsAutoUpdateSuppressed(RadObject, Boolean)
Sets the IsUpdateNeeded.
Declaration
public static void SetIsAutoUpdateSuppressed(RadObject obj, bool value)
Parameters
RadObject
obj
|
System.Boolean
value
|
Update(Boolean)
Updates this instance.
Declaration
protected virtual void Update(bool isManipulating = false)
Parameters
System.Boolean
isManipulating
|
UpdateDeferredGeometry(Point, Point, Point[])
Updates the deferred geometry.
Declaration
protected virtual void UpdateDeferredGeometry(Point start, Point end, Point[] points)
Parameters
Point
start
The start point of the connection. |
Point
end
The end point of the connection. |
Point[]
points
The intermediate connection points. |
UpdateGeometryOverride()
When overridden, provides the geometry for the connection.
Declaration
protected virtual void UpdateGeometryOverride()
Remarks
This is called whenever the connection is redrawn.
Events
ManipulationPointActivated
Occurs when a manipulation point of the RadDiagramConnection is activated.
Declaration
public event EventHandler<ManipulationPointActivatedEventArgs<IConnectionEditPoint>> ManipulationPointActivated
Event Type
System.EventHandler<ManipulationPointActivatedEventArgs<IConnectionEditPoint>>
|
Implements
Explicit Interface Implementations
IConnection.Update(Boolean)
Declaration
void IConnection.Update(bool isManipulating)
Parameters
System.Boolean
isManipulating
|
Implements
IConnection.UpdateDeferredGeometry(Point, Point, Point[])
Updates the deferred geometry.
Declaration
void IConnection.UpdateDeferredGeometry(Point start, Point end, Point[] points)
Parameters
Point
start
The start point of the connection. |
Point
end
The end point of the connection. |
Point[]
points
The intermediate connection points. |
Implements
ISupportMouseOver.get_IsMouseOver()
Declaration
bool ISupportMouseOver.get_IsMouseOver()
Returns
System.Boolean
|