This is a migrated thread and some comments may be shown as answers.

Diagram - ToXml()

1 Answer 16 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Joel Palmer
Top achievements
Rank 2
Joel Palmer asked on 27 May 2014, 06:29 PM
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);

1 Answer, 1 is accepted

Sort by
0
Joel Palmer
Top achievements
Rank 2
answered on 27 May 2014, 06:34 PM
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();
Tags
Diagram
Asked by
Joel Palmer
Top achievements
Rank 2
Answers by
Joel Palmer
Top achievements
Rank 2
Share this question
or