Load/Deserialize with GraphSource?

3 posts, 0 answers
  1. Terry
    Terry avatar
    17 posts
    Member since:
    Mar 2013

    Posted 07 Jan 2014 Link to this post

    I would like to be able to Load (and Save) a diagram by initiating the operation in the ViewModel.

    Currently, I need to inherit from RadDiagram and override the OnOpenCommandExecuted method to have custom Load behaviour. This is fine, except that I would like to Clear the diagram before Loading the saved XML. I can't use the RadDiagram.Clear() method when using GraphSource, however.

    Short of implementing my own Serialize/Deserialize in ViewModels, is there a nice way to achieve this currently?

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

    Posted 10 Jan 2014 Link to this post

    Hello Terry,

    When a graph source is used, you can clear the InternalItems and InternaLinks collections before loading the XML file. This logic can be triggered by a custom command implemented in your ViewModel. Furthermore, you will be able to trigger that command from code behind just before loading the new XML.

    Regarding the requirement for custom serialization, you need to have in mind that the RadDiagram uses SerializationService to manage those features. You can create your custom service and use it instead of the default ones. For more information please refer to our documentation.

    I hope this information is helpful.

    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 >>
  3. Terry
    Terry avatar
    17 posts
    Member since:
    Mar 2013

    Posted 17 Jan 2014 Link to this post

    Thank you. I ended up using InternalItems to handle this functionality
Back to Top