Class LinkViewModelBase<T>
A generic base class for the link or connection in a diagram source.
Inherited Members
Namespace: Telerik.Windows.Controls.Diagrams.Extensions.ViewModels
Assembly: Telerik.Windows.Controls.Diagrams.Extensions.dll
Syntax
public class LinkViewModelBase<T> : ItemViewModelBase, INotifyPropertyChanged, IDisposable, ILink<T>, ILink where T : NodeViewModelBase
Type Parameters
T
A type inheriting from NodeViewModelBase. |
Examples
If you want to map the Content of the link to the Content of the connection you need to add a Style like so
<Style TargetType="telerik:RadDiagramConnection">
<Setter Property="ContentTemplate" >
<Setter.Value>
<DataTemplate>
<TextBlock Text="{Binding Content}"/>
</DataTemplate>
</Setter.Value>
</Setter>
</Style>
.
Constructors
LinkViewModelBase()
Initializes a new instance of the LinkViewModelBase<T> class.
Declaration
public LinkViewModelBase()
LinkViewModelBase(T, T)
Initializes a new instance of the LinkViewModelBase<T> class.
Declaration
public LinkViewModelBase(T source, T target)
Parameters
T
source
The source. |
T
target
The target. |
Properties
Source
Gets or sets the source of the connection.
Declaration
public T Source { get; set; }
Property Value
T
The source. |
Implements
SourceCapType
Gets or sets the type of the source cap.
Declaration
public CapType SourceCapType { get; set; }
Property Value
CapType
The type of the source cap. |
Target
Gets or sets the target of this connection.
Declaration
public T Target { get; set; }
Property Value
T
The target. |
Implements
TargetCapType
Gets or sets the type of the target cap.
Declaration
public CapType TargetCapType { get; set; }
Property Value
CapType
The type of the target cap. |