Mvvm RadDiagramContainerShape

4 posts, 0 answers
  1. Laurent
    Laurent avatar
    2 posts
    Member since:
    Oct 2012

    Posted 30 Jan 2013 Link to this post

    Hi,

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

    Regards

    Laurent
  2. Miro Miroslavov
    Admin
    Miro Miroslavov avatar
    588 posts

    Posted 01 Feb 2013 Link to this post

    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.

  3. UI for WPF is Visual Studio 2017 Ready
  4. Terry
    Terry avatar
    17 posts
    Member since:
    Mar 2013

    Posted 28 Mar 2013 Link to this post

    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
  5. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1182 posts

    Posted 01 Apr 2013 Link to this post

    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.

Back to Top