Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic ControlNode restore from XML (Read 1886 times)
abereznyi
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 17
Joined: Feb 22nd, 2010
ControlNode restore from XML
Mar 17th, 2010 at 8:01pm
Print Post  
When I call diagram LoadFromXml() all ControlNodes do not show controls in them, only default colored shape with a word 'ControlNode'

However, I see that it shows tool-tips. I tried to invalidate layout of each control and even re-do diagram layout, but controls never show.

It seems that content of a control node is not saved at all.

Is there a way to do it?
  

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: ControlNode restore from XML
Reply #1 - Mar 17th, 2010 at 8:15pm
Print Post  
Unfortunately there's no way to save the controls automatically in Silverlight, so you will have to do that yourself by handling the SerializeControl and DeserializeControl events. In the WPF version we use the XamlWriter and XamlReader classes for this, but they are not available in Silverlight yet.
  
Back to top
 
IP Logged
 
abereznyi
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 17
Joined: Feb 22nd, 2010
Re: ControlNode restore from XML
Reply #2 - Mar 22nd, 2010 at 3:38pm
Print Post  
I see that Silverlight 3 & 4 have XamlReader class:

http://msdn.microsoft.com/en-us/library/cc189076%28VS.95%29.aspx

Can it work with Silverlight 4?
  

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: ControlNode restore from XML
Reply #3 - Mar 22nd, 2010 at 3:45pm
Print Post  
Indeed Silverlight provides a Xaml reader, but not writer. I've just found this project, which you might try using in the SerializeControl handler:
http://projectsilverlight.blogspot.com/2009/10/silverlight-3-xamlwriter-v04.html
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint