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

Base implementation of the IGraphSource which can be used to create an MVVM sources for RadDiagram.

Definition

Namespace:Telerik.Windows.Controls.Diagrams.Extensions.ViewModels

Assembly:Telerik.Windows.Controls.Diagrams.Extensions.dll

Type Parameters:

TNode

The data type of the node.

TLink

The data type of the link.

Syntax:

C#
public class GraphSourceBase<TNode, TLink> : ViewModelBase, INotifyPropertyChanged, IDisposable, IGraphSource where TLink : ILink

Inheritance: objectViewModelBaseGraphSourceBase<TNode, TLink>

Derived Classes: ObservableGraphSourceBase<TNode, TLink>

Implements: IDisposableIGraphSourceINotifyPropertyChanged

Inherited Members ViewModelBase.VerifyPropertyName(string)ViewModelBase.UpdateValue<T>(ref T, T, string)ViewModelBase.InvokeOnUIThread(Action)ViewModelBase.Dispose()ViewModelBase.RaisePropertyChanged(string)ViewModelBase.OnPropertyChanged(string)ViewModelBase.OnPropertyChanged<T>(Expression<Func<T>>)ViewModelBase.Dispose(bool)ViewModelBase.PropertyChanged...

Constructors

Initializes a new instance of the GraphSourceBase<TNode, TLink> class.

C#
public GraphSourceBase()

Properties

Gets the internal items collection.

C#
public ObservableCollection<TNode> InternalItems { get; }

Gets the internal links collection.

C#
public ObservableCollection<TLink> InternalLinks { get; }

Gets the node items.

C#
public IEnumerable Items { get; }

Implements: IGraphSource.Items

Gets the links or connections of this diagram source.

C#
public IEnumerable<ILink> Links { get; }

Implements: IGraphSource.Links

Methods

Adds the given link to this diagram source.

C#
public virtual void AddLink(TLink link)
Parameters:linkTLink

The link to add.

Adds a node (shape) to this diagram source.

C#
public virtual void AddNode(TNode node)
Parameters:nodeTNode

The node to add.

Removes all items and links from this source.

C#
public virtual void Clear()

Removes the item from the source.

C#
public virtual bool RemoveItem(TNode node)
Parameters:nodeTNode

The node.

Returns:

bool

Removes the link from this source.

C#
public virtual bool RemoveLink(TLink link)
Parameters:linkTLink

The link.

Returns:

bool