This is a migrated thread and some comments may be shown as answers.

Mvvm RadDiagramContainerShape

3 Answers 159 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Laurent
Top achievements
Rank 1
Laurent asked on 30 Jan 2013, 01:41 PM
Hi,

How can I use a RadDiagramContainerShape with a mvvm datababing in a RadDiagram

Regards

Laurent

3 Answers, 1 is accepted

Sort by
0
Miro Miroslavov
Telerik team
answered on 01 Feb 2013, 02:23 PM
Hello Laurent,

 With the latest official release the RadDiagram containers are not very MVVM friendly. But still you may achieve most of the scenarios you may need. You can check the attached sample project.
With the upcoming in few weeks Q1.2013 release, the containers will be much improved and will better support MVVM.
Hope this helps. 

Regards,
Miro Miroslavov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Terry
Top achievements
Rank 1
answered on 28 Mar 2013, 10:57 PM
Hello,

Is there a good sample of RadDiagramContainerShape with MVVM? The sample provided above crashes when trying to drag a shape out of the container.

Thanks
0
Pavel R. Pavlov
Telerik team
answered on 01 Apr 2013, 05:37 PM
Hi Terry,

You are right that this is unwanted behavior. In order to overcome it we created an interface that can be used in such scenarios. It is called "IContainerItem". You can either implement its abstract members on your own, or derive a class from our ContainerNodeViewModelBase which implements it. For your convenience we created a derived class in the attached project. Please take a look at it and let us know is it works for you. If you need to see an extended MVVM project you can take a look at our ready to run XAML github example.

Note that I will delete the previously attached project.

All the best,
Pavel R. Pavlov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
Diagram
Asked by
Laurent
Top achievements
Rank 1
Answers by
Miro Miroslavov
Telerik team
Terry
Top achievements
Rank 1
Pavel R. Pavlov
Telerik team
Share this question
or