Saving layout state to existing xml config file

Docking/MDI for Windows Forms Forum

Posted 19 years ago by Adamczak - Developer, AAA Software Enterprises
Avatar
Is there a way to add functionality that allows me to save the dock layout state to an existing xml file? I already have a config file where I save other preference data for the gui, and I'd like to put the layout state into the same file. So a function like SaveToolWindowLayoutToFile but one that takes an xml element as the root to save state to.

Comments (5)

Posted 19 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
The way our XML serializer works is that it reads from an XmlTextReader and writes to an XmlTextWriter. Would exposing methods that accept those as parameters help?


Actipro Software Support

Posted 19 years ago by Adamczak - Developer, AAA Software Enterprises
Avatar
The way my gui config code works is it has non-sequential access to the state (an XmlDocument), so a reader and writer will probably not work for me. I will just update my config support to save the dock layout in a parallel file that matches my config file name.
Posted 19 years ago by Adamczak - Developer, AAA Software Enterprises
Avatar
Actually, exposing methods for the xnk reader and xml writer would work for me. I could just create a string writer and write out the doc to a string, bring it into an XmlDocument and move the nodes over. I could do the same thing when reading. So yes, please expose those two methods. Thanks
Posted 19 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Have you see our ToolWindowLayoutData property? It's another way to get/set the layout data.

That gets/sets an XmlDocument object. Could you get your node data from that?


Actipro Software Support

Posted 19 years ago by Adamczak - Developer, AAA Software Enterprises
Avatar
That will work, thanks!
The latest build of this product (v24.1.0) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.