Class
RadDiagramConnector

Represents a connector point.

Definition

Namespace:Telerik.Windows.Controls.Diagrams

Assembly:Telerik.Windows.Controls.Diagrams.dll

Syntax:

cs-api-definition
public class RadDiagramConnector : Control, IConnector, ISupportMouseOver, ICloneable, ISerializable

Inheritance: objectRadDiagramConnector

Implements: ICloneableIConnectorISerializableISupportMouseOver

Constructors

RadDiagramConnector()

Initializes a new instance of the RadDiagramConnector class.

Declaration

cs-api-definition
public RadDiagramConnector()

Fields

ActivationChangedEvent

Identifies the ConnectorActivated routed event.

Declaration

cs-api-definition
public static readonly RoutedEvent ActivationChangedEvent

Field Value

RoutedEvent

OffsetProperty

The Offset dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty OffsetProperty

Field Value

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

cs-api-definition
public Point Offset { get; set; }

Property Value

Point

The connector's offset.

Implements IConnector.Offset

Shape

Gets the associated shape.

Declaration

cs-api-definition
public IShape Shape { get; }

Property Value

IShape

Implements IConnector.Shape

Methods

CalculateRelativePosition(Size)

Calculate the relative position of this connector.

Declaration

cs-api-definition
public virtual Point CalculateRelativePosition(Size shapeSize)

Parameters

shapeSize

Size

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)

Deserialize(SerializationInfo)

Deserializes the specified info.

Declaration

cs-api-definition
public virtual void Deserialize(SerializationInfo info)

Parameters

info

SerializationInfo

The info.

Implements ISerializable.Deserialize(SerializationInfo)

OnInitialized(EventArgs)

Declaration

cs-api-definition
protected override void OnInitialized(EventArgs e)

Parameters

e

EventArgs

OnMouseEnter(MouseEventArgs)

Declaration

cs-api-definition
protected override void OnMouseEnter(MouseEventArgs e)

Parameters

e

MouseEventArgs

OnMouseLeave(MouseEventArgs)

Declaration

cs-api-definition
protected override void OnMouseLeave(MouseEventArgs e)

Parameters

e

MouseEventArgs

OnMouseLeftButtonDown(MouseButtonEventArgs)

Declaration

cs-api-definition
protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)

Parameters

e

MouseButtonEventArgs

OnOffsetChanged(Point, Point)

Called when [offset changed].

Declaration

cs-api-definition
protected virtual void OnOffsetChanged(Point oldOffset, Point newOffset)

Parameters

oldOffset

Point

The old offset.

newOffset

Point

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

cs-api-definition
public virtual SerializationInfo Serialize()

Returns

SerializationInfo

Implements ISerializable.Serialize()

UpdateVisualStates()

Updates the visual states.

Declaration

cs-api-definition
protected virtual void UpdateVisualStates()

Events

ActivationChanged

Occurs when [connector activation changed].

Declaration

cs-api-definition
public event RadRoutedEventHandler ActivationChanged

Event Value

RadRoutedEventHandler

OffsetChanged

Occurs when [offset changed].

Declaration

cs-api-definition
public event EventHandler<OffsetEventArgs> OffsetChanged

Event Value

EventHandler<OffsetEventArgs>