Plan to support GraphSource TwoWay binding mode ?

8 posts, 0 answers
  1. Robert
    Robert avatar
    17 posts
    Member since:
    Jun 2012

    Posted 21 Mar 2012 Link to this post

    I'm testing your new diagram component. Keep up the good work !
    This being said, I noticed that an exception raised (InvalidOperationException:"Cannot modify the Items collection when GraphSource is set.") is  when I edit my diagram ( copy/paste...) if GrapSource is bound to a datasource.

    Do you plan to support this scenario ? It would be very useful.

    Rgds,
    Robert
  2. Miro Miroslavov
    Admin
    Miro Miroslavov avatar
    588 posts

    Posted 21 Mar 2012 Link to this post

    Hi Robert,

     Thank you for your feedback. Unfortunately we support only one direction data-binding for the moment. It is documented in the help too. For the moment we don't have exact date when this will be implemented but we are also considering it. You can also read the Q2 roadmap here.
    On a side note, this operation is somewhat considered harmful. It is better to manipulate the items through the ViewModels, so you can handle the Paste event and update your source collection (handle the event too) thus the diagram will be updated from the modified source collection.
    Please let us know if you have further feedback or questions. 
    Thank you.

    Greetings,
    Miro Miroslavov
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. Robert
    Robert avatar
    17 posts
    Member since:
    Jun 2012

    Posted 21 Mar 2012 Link to this post

    The idea is to modify the underlying model, which is databound, based on actions on the diagram. Currently, I cannot use GraphSource binding, and I'm affraid that monitoring ItemsChanged event property (add ? delete ?...) to update the underlying model can be complex. Where it can be provided out of the box with two way binding on "smarter" IGraphSource instance.
    But I understand your recommandation about this way

    Rgds,
    Robert
  5. Miro Miroslavov
    Admin
    Miro Miroslavov avatar
    588 posts

    Posted 22 Mar 2012 Link to this post

    Hello Robert,

     Your point is really valid too. Smarter GraphSource interface is something that we also want to have. The Q2 is already planned and the features are on its way, but I can assure you that for Q3 this feature will be in the list. 
    Any other ideas and feedback are more than welcomed. 
    Thank you.

    Kind regards,
    Miro Miroslavov
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  6. Timo
    Timo avatar
    2 posts
    Member since:
    Jun 2009

    Posted 30 Mar 2012 Link to this post

    Hi Miro,

    i am having a similar issue. I am adding a new Shape using a DelegateCommand and then adding my ViewModel to my GraphSources internal items (using the demo NodeViewModelBase). This shows another Shape on the surface like expected. My Problem is, i get an exception when trying to make a connection from one shape to another (on the RadDiagram surface). What is the recomended way doing this with MVVM? Do i have to monitor events to catch the selection of the connector and then provide the drawing of the connection until the button is released myself? Doing this i could add a connection to the GraphSource by bypassing the build in features, but i would have to rebuild all myself.
    These are just some quick thoughts. I would appreciate advice how to do this in a better way (perhaps reusing build in functionality).

    Kind regards,
    Timo
  7. Miro Miroslavov
    Admin
    Miro Miroslavov avatar
    588 posts

    Posted 02 Apr 2012 Link to this post

    Hi Timo,

     Unfortunately, MVVM is supported only one way and in read-only mode. You can't really workaround this limitation because some key events are still missing like ConnectionAttaching (PreviewConnectionAttached) - they will be available for the official release of the control. Also ItemsChanged is raised too late and in that case is not useful. But please note that we raise this issue's priority, so that we will fix it and support more MVVM scenarios for Q2 and even earlier with some of our internal build. 
    You can also share more details on your different scenarios and further feature requests and expectations regarding MVVM.
    Thank you.

    All the best,
    Miro Miroslavov
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  8. John
    John avatar
    1 posts
    Member since:
    May 2012

    Posted 21 May 2012 Link to this post

    Hi Miro,

    Looking at the latest internal build, I don't see any changes from Q1 SP1 regarding RadDiagram. Do you have any idea when TwoWay MVVM support will be available (even in internal builds)? We're building an app that isn't going to be released for quite a while, and it would be nice to have the two-way binding to test and get our app working well with soon.

    Thanks!
  9. Miro Miroslavov
    Admin
    Miro Miroslavov avatar
    588 posts

    Posted 23 May 2012 Link to this post

    Hi John,

     The Two-Way data binding support will be available in a few weeks with our Q2 release, which is scheduled for the beginning of June. 
    Please let us know if you have further questions. 

    Regards,
    Miro Miroslavov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top
UI for WPF is Visual Studio 2017 Ready