Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Custom data in Diagram (Read 1241 times)
Aziz ur Rahman
YaBB Newbies
*
Offline



Posts: 43
Joined: Feb 23rd, 2009
Custom data in Diagram
Mar 24th, 2009 at 1:00pm
Print Post  
I want to save some custom data in the context of whole diagram not nodes... e.g.

<Diagram Version="13" Data1="Hello" Data2="hi">
..........
</Diagram>

I inherit Diagram class but only SaveToXml method is available for overriding. There is no method for Loading...

Is there any simple way? Am i missing something?

  

Syed Aziz ur Rahman
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Custom data in Diagram
Reply #1 - Mar 24th, 2009 at 3:42pm
Print Post  
Check the version from the private messages page. It makes LoadFromXml a virtual method. A more simple way might be to assign your custom data to Diagram.Tag and serialize it using the SerializeTag and DeserializeTag events.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Aziz ur Rahman
YaBB Newbies
*
Offline



Posts: 43
Joined: Feb 23rd, 2009
Re: Custom data in Diagram
Reply #2 - Mar 25th, 2009 at 6:20am
Print Post  
Currently I used to load custom data by loading diagram XML in a XmlDocument and reading the attributes of diagram node.

But.. Thanks for quick response and updated code. Doing it in an event or overrided memeber will be much cleaner.
  

Syed Aziz ur Rahman
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint