Edit this page

LinkViewModelBase

Telerik Diagramming Framework provides a list of ViewModels defined in the Telerik.Windows.Controls.Diagrams.Extensions.dll.

This article describes the LinkViewModelBase defined in the Diagramming Extensions.

Overview

The LinkViewModelBase class is a ViewModel designed to serve as a base ViewModel for RadDiagramConnections in a data-bound RadDiagram. As the connection can start from one shape and end in another one, the LinkViewModelBase class is defined to expose properties that track these source and target shapes.

Essentially the LinkViewModelBase derives from ItemViewModelBase and therefore the class exposes all properties defined in the ItemViewModelBase class. Moreover, the LinkViewModelBase class inherits the ILink interface, where T should derive from NodeViewModelBase

LinkViewModelBase Inheritance Model
raddiagram-data-linkviewmodel

Constructors

Name Description
LinkViewModelBase() Initializes a new instance of the LinkViewModelBase class that represents a link on the diagramming surface.
LinkViewModelBase(T source, T target) Initializes a new instance of the LinkViewModelBase class that represents a link starting from the specified source node and ending at the specified target node.

Properties

The LinkViewModelBase class exposes the following properties:

Properties:

Name Description
Source Gets or sets the source of the connection which should be of type deriving from NodeViewModelBase.
Target Gets or sets the target of the connection which should be of type deriving from NodeViewModelBase.
SourceCapType Gets or sets the CapType of the start of the represented connection. You can find more information regarding the different CapTypes in the Connections article.
TargetCapType Gets or sets the CapType of the end of the represented connection. You can find more information regarding the different CapTypes in the Connections article.

Inherited Properties:

Name Description
Visibility Gets or sets the Visibility of the represented connection. The property is of type Visibility.
Position Gets or sets the coordinates of a Point that represents the position of a connection.
Content Gets or sets an object that represents the content of the represented connection.
IsSelected Gets or sets a Boolean value indicating whether the represented connection is selected.

See Also