Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic How to serialize the DiagramDocument Tag property (Read 2011 times)
Sabrina C.
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 35
Joined: Dec 20th, 2012
How to serialize the DiagramDocument Tag property
Apr 23rd, 2013 at 3:12pm
Print Post  
Hi,

We're trying to serialize a class set in the Tag property of the DiagramDocument class (hold by the TabbedDiagramView Document property).

We need to serialize data which is independent from the presence of pages in the Document, since we require to serialize also empty documents with our custom data in Tag property. Unfortunately it seems that the Tag property is never serialized in the output XML.

Can you help?

Thanks, Agus
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: How to serialize the DiagramDocument Tag property
Reply #1 - Apr 24th, 2013 at 6:15am
Print Post  
Hi,

You could call diagramDoc.SaveToXml(XmlDocument), add your custom data using the XmlDocument API methods, and then save to file via XmlDocument.Save().

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: How to serialize the DiagramDocument Tag property
Reply #2 - Apr 25th, 2013 at 7:57am
Print Post  
This version will now save Tag automatically or raise Serialize/DeserializeTag events to let you save it:
http://mindfusion.eu/Forum/YaBB.pl?num=1366875705

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint