Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic How to save and load my customer node from xml (Read 1210 times)
Fanli
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 4
Joined: Jun 6th, 2012
How to save and load my customer node from xml
Jun 6th, 2012 at 8:05am
Print Post  
Hi Stoyan,
I create my own node class by deriving from DiagramNode In my project and I know i will override the SaveToXml and LoadFromXml methods of the DiagramItem class. But It doesn't work. I hope you can give me some help or a demo about it?

Best Regards,
Ferry
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: How to save and load my customer node from xml
Reply #1 - Jun 6th, 2012 at 8:21am
Print Post  
Hi Ferry,

Apart from overriding the Save / Load methods, you must also call the RegisterItemClass method. The code below is from Tutorial 4, which shows how to implement custom serialization and undo/redo.

Code
Select All
// enable serialization of the custom class
Diagram.RegisterItemClass(typeof(OrgChartNode), "my:OrgChartNode", 1);
 



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