![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
| |
| | #1 (permalink) |
| | 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 |
My System Specs![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Can't delete elements in folder Recent elements | Vista General | |||
| Support for Adobe photoshop elements 5 or premier elements 3 on Vista 64 bits | Vista General | |||
| Serialize WordPad OLE data to a file? | PowerShell | |||