![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | IAddChild and XAML serialization process ?? Hello I try to use xaml serializer framework to save in .xaml file my own hierarchical graph of object. The first step is done : I create my own file with something like this : <Root xmlns="clr-namespace:myNameSpace;assembly=MyAssembly"> <Structure ...> <SimpleText ... /> </Structure> </Root> with a simple call like this : outStream = new System.IO.FileStream(@"c:\temp\essai.xaml", System.IO.FileMode.Create); using (outStream) { System.Windows.Markup.XamlWriter.Save(rootInstance, outStream); } BUT when I want to reverse the process (Create a RootInstance from xaml file) with a call like this : System.IO.FileStream inStream = new System.IO.FileStream(@"c:\temp\essai.xaml", System.IO.FileMode.Open); using (inStream) { return (Root)System.Windows.Markup.XamlReader.Load(inStream); } Root is created Structure is created SimpleText is created BUT i have after this, an exception like "SimpleText can be added in Structure" occurs !! Structure and Root supports IEnumerable and IAddChild interface !! I don't know what I forgot somewhere ???? could you help me thanks a lot for your help ! |
My System Specs![]() |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Is it possible to include XAML files into another XAML file? | star-italia | .NET General | 6 | 06-12-2008 04:56 AM |
| Serialization to XAML and registered names do not work | Ralf Ziller | Avalon | 0 | 08-26-2007 09:02 AM |
| bug in xaml serialization of Int32Collection | Robert Ludig | Avalon | 0 | 05-19-2007 12:39 PM |
| How to deploy an XAML-based App with its XAML-UI-File? | Solveigh | Avalon | 11 | 11-08-2006 07:50 AM |
| Serialization to XAML and cloning... | damien morton | Avalon | 0 | 03-03-2006 10:26 PM |