Diagram - ToXml()

2 posts, 0 answers
  1. Joel Palmer
    Joel Palmer avatar
    164 posts
    Member since:
    May 2009

    Posted 27 May 2014 Link to this post

    This code takes the DataContext of the Diagram and Serializes it to XML and saves it to file.  However, I want to keep the shape's properties in my own object as XML.  So, I don't want it to save to file.  I want to the read the value into my own object then Serialize my object using XmlSerialization.  Is there any other option to get diagram to give up its XML?   Can this be done using your Persistance framework?

    As always, a code example is appreciated.


    FileManager fileManager = new FileManager(diagram);
    fileManager.SaveToFile(FileLocation.Disk);
  2. Joel Palmer
    Joel Palmer avatar
    164 posts
    Member since:
    May 2009

    Posted 27 May 2014 in reply to Joel Palmer Link to this post

    I love replying to my own questions... but, I just found the Save() method that seems to give me what I need.  Thanks anyway.

    string save = diagram.Save();
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top