New to Telerik UI for WPFStart a free 30-day trial

Represents a connector point.

Definition

Namespace:Telerik.Windows.Controls.Diagrams

Assembly:Telerik.Windows.Controls.Diagrams.dll

Syntax:

C#
public class RadDiagramConnector : Control, IConnector, ISupportMouseOver, ICloneable, ISerializable

Inheritance: objectRadDiagramConnector

Implements: ICloneableIConnectorISerializableISupportMouseOver

Constructors

Initializes a new instance of the RadDiagramConnector class.

C#
public RadDiagramConnector()

Fields

Identifies the ConnectorActivated routed event.

C#
public static readonly RoutedEvent ActivationChangedEvent

OffsetProperty

DependencyProperty

The Offset dependency property.

C#
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.

C#
public Point Offset { get; set; }
Property Value:

The connector's offset.

Implements: IConnector.Offset

Gets the associated shape.

C#
public IShape Shape { get; }

Implements: IConnector.Shape

Methods

Calculate the relative position of this connector.

C#
public virtual Point CalculateRelativePosition(Size shapeSize)
Parameters:shapeSizeSize

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: IConnector.CalculateRelativePosition(Size)

Deserializes the specified info.

C#
public virtual void Deserialize(SerializationInfo info)
Parameters:infoSerializationInfo

The info.

Implements: ISerializable.Deserialize(SerializationInfo)

C#
protected override void OnInitialized(EventArgs e)
Parameters:eEventArgs
C#
protected override void OnMouseEnter(MouseEventArgs e)
Parameters:eMouseEventArgs
C#
protected override void OnMouseLeave(MouseEventArgs e)
Parameters:eMouseEventArgs
C#
protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
Parameters:eMouseButtonEventArgs

Called when [offset changed].

C#
protected virtual void OnOffsetChanged(Point oldOffset, Point newOffset)
Parameters:oldOffsetPoint

The old offset.

newOffsetPoint

The 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.

C#
public virtual SerializationInfo Serialize()
Returns:

SerializationInfo

Implements: ISerializable.Serialize()

Updates the visual states.

C#
protected virtual void UpdateVisualStates()

Events

Occurs when [connector activation changed].

C#
public event RadRoutedEventHandler ActivationChanged

OffsetChanged

EventHandler<OffsetEventArgs>

Occurs when [offset changed].

C#
public event EventHandler<OffsetEventArgs> OffsetChanged