Telerik Diagramming Framework provides a list of ViewModels defined in the Telerik.Windows.Controls.Diagrams.Extensions.dll.
This article describes the ObservableGraphSourceBase
If you need to define a data-bound RadDiagram that has to support drag and drop of items, then you need to make sure that your custom GraphSource implementation derives from the ObservableGraphSourceBase
or from a class inheriting the ObservableGraphSourceBase class (for instance the SerializableGraphSourceBase class). Only then the drag/drop operations will be reflected in your ViewModels.
|InternalItems||Gets the internal ObservableCollection of business nodes.|
|InternalLinks||Gets the internal ObservableCollection of business links.|
|Items||Gets an IEnumerable collection of business nodes.|
|Links||Gets an IEnumerable collection of business links.|
|CreateLink(object source, object target)||Creates a new ILink object associated with the specified source and target nodes.|
|CreateNode(IShape shape)||Creates a new instance of the TNode type. And as it receives an IShape object, when you override it, you can use the IShape argument to create a TNode instance associated with the specified shape.|
Inherited Virtual Methods
|AddNode(TNode)||Adds a specified business node to the InternalItems collection.|
|AddLink(TLink)||Adds a specified business link to the InternalLinks collection.|
|RemoveLink(TLink)||Removes a specified business link from the InternalLinks collection and returns a boolean value indicating whether the operation was successful.|
|RemoveItem(TNode)||Removes a specified business node from the InternalItems collection and returns a boolean value indicating whether the operation was successful.|
|Clear||Removes all nodes and links from the InternalItems and InternalLinks collections.|
Please note that in your solution it is best to create a custom class deriving from ObservableGraphSourceBase. Once you do so, you will be able to override all of the above virtual methods. This will allow you to describe a custom RadDiagram GraphSource class that supports TwoWay binding scenarios where any changes in the RadDiagram UI are reflected in your GraphSource implementation.