Class RadDiagramConnector
Represents a connector point.
Inheritance
Namespace: Telerik.Windows.Controls.Diagrams
Assembly: Telerik.Windows.Controls.Diagrams.dll
Syntax
public class RadDiagramConnector : Control, IConnector, ISupportMouseOver, ICloneable, ISerializable, IThemable
Constructors
RadDiagramConnector()
Initializes a new instance of the RadDiagramConnector class.
Declaration
public RadDiagramConnector()
Fields
ActivationChangedEvent
Identifies the ConnectorActivated routed event.
Declaration
public static readonly RoutedEvent ActivationChangedEvent
Field Value
System.Windows.RoutedEvent
|
OffsetProperty
The Offset dependency property.
Declaration
public static readonly DependencyProperty OffsetProperty
Field Value
System.Windows.DependencyProperty
|
Properties
Offset
Gets or sets the offset of the top-left corner of the shape. A value of zero corresponds to the upper-left corner, while a value of one corresponds to the right side of the shape.
Values outside the [0,1]
range will position the connector outside the shape.
Declaration
public Point Offset { get; set; }
Property Value
System.Windows.Point
The connector's offset. |
Implements
Shape
Gets the associated shape.
Declaration
public IShape Shape { get; }
Property Value
IShape
|
Implements
Methods
CalculateRelativePosition(Size)
Calculate the relative position of this connector.
Declaration
public virtual Point CalculateRelativePosition(Size shapeSize)
Parameters
System.Windows.Size
shapeSize
Size of the shape. |
Returns
System.Windows.Point
The desired position of the connector's center. This position is relative to the parent shape's (connectorsControl's) position. |
Implements
Deserialize(SerializationInfo)
Deserializes the specified info.
Declaration
public virtual void Deserialize(SerializationInfo info)
Parameters
SerializationInfo
info
The info. |
Implements
OnInitialized(EventArgs)
Declaration
protected override void OnInitialized(EventArgs e)
Parameters
System.EventArgs
e
|
OnMouseEnter(MouseEventArgs)
Declaration
protected override void OnMouseEnter(MouseEventArgs e)
Parameters
System.Windows.Input.MouseEventArgs
e
|
OnMouseLeave(MouseEventArgs)
Declaration
protected override void OnMouseLeave(MouseEventArgs e)
Parameters
System.Windows.Input.MouseEventArgs
e
|
OnMouseLeftButtonDown(MouseButtonEventArgs)
Declaration
protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
Parameters
System.Windows.Input.MouseButtonEventArgs
e
|
OnOffsetChanged(Point, Point)
Called when [offset changed].
Declaration
protected virtual void OnOffsetChanged(Point oldOffset, Point newOffset)
Parameters
System.Windows.Point
oldOffset
The old offset. |
System.Windows.Point
newOffset
The new offset. |
Serialize()
Serializes this instance. Primitives like Background, Foreground, Stroke , Width, height are saved only if they are locally set. If they are set via style, we expect the style to be applied after save/load so there is no need to save them and load them. This is also done for performance reasons. Exception of this rule are the Name and Offset properties which can be used to define a custom connector and we do not expect them to be set in Style setter because Connectors do not provide MVVM support.
Declaration
public virtual SerializationInfo Serialize()
Returns
SerializationInfo
|
Implements
UpdateVisualStates()
Updates the visual states.
Declaration
protected virtual void UpdateVisualStates()
Events
ActivationChanged
Occurs when [connector activation changed].
Declaration
public event RadRoutedEventHandler ActivationChanged
Event Type
RadRoutedEventHandler
|
OffsetChanged
Occurs when [offset changed].
Declaration
public event EventHandler<OffsetEventArgs> OffsetChanged
Event Type
System.EventHandler<OffsetEventArgs>
|
Explicit Interface Implementations
ICloneable.Clone()
Clones this instance.
Declaration
object ICloneable.Clone()
Returns
System.Object
|
Implements
IConnector.AbsolutePosition
Gets the absolute (actual or real) position.
Declaration
Point IConnector.AbsolutePosition { get; }
Returns
System.Windows.Point
The point where this connector's center is located on the diagram surface. |
Implements
IConnector.IsActive
Gets or sets a value indicating whether this instance is active.
Declaration
bool IConnector.IsActive { get; set; }
Returns
System.Boolean
|