![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
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 | can't serialize ViewPort3d child elements... hi, i have a 3d-land thing going, and i want to serialize all the objects in the scene with XamlWriter. the objects are added as children of a ViewPort3D. i tried serializing ViewPort3D.Children which is a Visual3DCollection but this can't be deserialized because it has no default constructor (the XamlReader barfs with a XamlParseException). so instead i tried serializing eaech of the child elements individually, like so: using (StreamWriter sw = File.CreateText(d.SafeFileName)) foreach(Visual3D v in this.mainViewport.Children) XamlWriter.Save(v, sw); and this saves it alright, but it won't deserialize because "there are multiple root elements". i tried manually adding an <xml> root element but it got very messy to deserialise. what is the correct approach? i don't really want to serialize out the entire window contents, because the code behind will change with new menus / options etc., and i will want to be able to use old xaml files from a previous version. thanks in advance tim |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Can't delete elements in folder Recent elements | Gudmund Liebach Nielsen | Vista General | 1 | 05-05-2008 07:17 PM |
| Support for Adobe photoshop elements 5 or premier elements 3 on Vista 64 bits | Sébastien DELAYRE | Vista General | 5 | 03-26-2007 09:57 AM |
| Viewport3D in XPS | Alex74 | Avalon | 2 | 01-26-2007 01:36 PM |