RadDiagramConnector
Represents a connector point.
Definition
Namespace:Telerik.Windows.Controls.Diagrams
Assembly:Telerik.Windows.Controls.Diagrams.dll
Syntax:
public class RadDiagramConnector : Control, IConnector, ISupportMouseOver, ICloneable, ISerializable
Inheritance: objectRadDiagramConnector
Implements:
Constructors
Initializes a new instance of the RadDiagramConnector class.
public RadDiagramConnector()
Fields
ActivationChangedEvent
RoutedEvent
Identifies the ConnectorActivated routed event.
public static readonly RoutedEvent ActivationChangedEvent
OffsetProperty
DependencyProperty
The Offset dependency property.
public static readonly DependencyProperty OffsetProperty
Properties
Offset
Point
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.
public Point Offset { get; set; }
The connector's offset.
Implements:
Methods
Calculate the relative position of this connector.
public virtual Point CalculateRelativePosition(Size shapeSize)
Size of the shape.
Returns:Point
The desired position of the connector's center. This position is relative to the parent shape's (connectorsControl's) position.
Implements:
Deserializes the specified info.
public virtual void Deserialize(SerializationInfo info)
The info.
Implements:
protected override void OnMouseEnter(MouseEventArgs e)
protected override void OnMouseLeave(MouseEventArgs e)
protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
Called when [offset changed].
protected virtual void OnOffsetChanged(Point oldOffset, Point newOffset)
The old offset.
newOffsetPointThe new offset.
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.
Updates the visual states.
protected virtual void UpdateVisualStates()
Events
Occurs when [connector activation changed].
public event RadRoutedEventHandler ActivationChanged
OffsetChanged
EventHandler<OffsetEventArgs>
Occurs when [offset changed].
public event EventHandler<OffsetEventArgs> OffsetChanged