I am trying to save the MDI state when closing the application and load it when opening. Like FireFox, it opens all the web pages last time when you close the application. I've noticed that UltraTabbedMdiManager have methods like SaveAsXml and LoadFromXml.What is contained in the saved XML file?
What do I need to do if I want to open the last visited pages like FireFox? Thanks.Mike
Mike2008, I am going to take advantage of your thread to ask Mike Dour a related question. hope that is okay.
Mike Dour, what is the relative benefit of the Base 64 approach over XML? I am very new to this and hopefully not asking something very basic. It seems like using the XML would be advantageous for application support purposes.
Thanks!
If you use an XmlTextWriter like in the code I posted, I believe there is a WriteString method which will escape all control characters automatically. When you read back the string value with the XmlTextReader, the string will automatically be unescaped.
Mike Dour"]However, if you want to know how to combine the layout files into one layout file, the code posted originally will do that.
I'm not sure I understand the question. Do you want to be able to read the layout file in an editor or do you want to have all layout files for different components stored in one file? If you want to open the layout file in an xml editor and be able to read it, you can use SaveAsXML and try to write string values insted of base 64 values in elements. You would need to wrap the serialized stream with a StreamReader to get the text value written to the stream. Similarly, when you read the text from the xml file, you would need to create a new MemoryStream, wrap it in a StreamWriter and write the text value to the writer. However, if you want to know how to combine the layout files into one layout file, the code posted originally will do that.
That saves all the layout settings in one XML file.However, there is a limitation: the individual layout is saved as Binary, and therefore unreadable.The ReadBase64 method is reading each binary block in the XML file.
Is it possible to use SaveAsXml on individual layout and combine them into the final XML file? and how can I read it back? Thanks!