How I can Save layout in Silverlight
I am working on silverlight application and I want save layout as a sheet.
The flow is here.
I Have StackPanel and children of StackPanel is WrapPanel and inside the WrapPanel I a开发者_高级运维m adding multiple Images.
The Size of the StackPanel is according to user define height and width.
so how I can save this sheet.
Thanks..!!!!
In WPF there exists a XamlWriter which can write your Visual Tree to a XAML string. However, this is not available in the Silverlight APIs. Fortunately someone has written a XamlWriter for Silverlight and it is available here:
http://www.davidpoll.com/2010/07/25/to-xaml-with-love-an-experiment-with-xaml-serialization-in-silverlight/
With this you can save your 'sheet' to a XAML string, the use XamlReader.Load to reconstruct it:
http://msdn.microsoft.com/en-us/library/cc189076%28VS.95%29.aspx
精彩评论