RadDiagram : Conversion to MVVM

2 posts, 0 answers
  1. Sherwin
    Sherwin avatar
    3 posts
    Member since:
    Feb 2013

    Posted 24 Jun 2013 Link to this post

    Hi Telerik Team,

    Currently, I am working on the conversion from a non-MVVM program to MVVM.

    Previously, I used ConnectionManipulationCompleted(Code-Behind) event trigger of RadDiagram control. Within this event trigger, I am able to know the exact connection that was being drawn from a RadDiagramShape to another RadDiagramShape.

    While I am on my way to MVVM approach, I faced some problem that is that I am not able to know which is exact connection that was being drawn as ConnectionManipulationCompleted(Code-Behind) event trigger does.

    Hope you can help me on this.

    The sample that I am used was from http://www.telerik.com/ClientsFiles/3eaf3a91-f06c-43e5-96b3-14dfe4a472f1_Connection-MVVM-LinkViewModel.zip.

    Thanks. Your prompt reply will be very much appreciated.

  2. Pavel R. Pavlov
    Pavel R. Pavlov avatar
    1237 posts

    Posted 27 Jun 2013 Link to this post

    Hello Sherwin,

    Thank you for providing us with detailed information about your scenario. I can see that you subscribe to the PropertyChanged event of the Link. This is the best approach to update all the properties of a Link in your View-Model. Currently, you check if the changed property is the Target. Also, you can check the Source property. By doing so you will be able to specify the exact connection that has been drawn by the user.

    Please try this approach out and let me know if you have any other questions.

    Pavel R. Pavlov
    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 >>
Back to Top