Please accept our apology for the delayed response on this matter. Let me get straight to your question.
Basically, in MVVM scenario the RadDiagram
framework uses a GraphSource
to visualize the custom shapes and links that you have defined. Please note that the GraphSource
property of the RadDiagram
is a dependency property, hence you can bind a custom class to it.
Furthermore, in data-binding scenarios (like a Lightswitch application) you can derive custom classes from Telerik's NodeViewModelBase
. These classes are part of the Telerik.Windows.Controls.Diagrams.Extensions.dll
and you can use them to achieve your requirements.
Please take a look at this article
, where we demonstrated how a GraphSource
can be used (also VB code is available).
Regarding the requirement to access the properties and the methods of the RadDiagram
- you could access the RadDiagram
control itself (including all properties and methods) in your code behind file. You just need to set the x:Name
property to the control in XAML.
However, please note that using commands
and the Event-To-Command
pattern you can move all the custom logic into your ViewModels
- instead implementing it in code behind. By doing this you will stick to the MVVM approach.
Once again please accept our apology for the late response. I very much hope that you will continue using our controls in the future.
Pavel R. Pavlov
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>