SaveCustomToolWindowLayoutData

Docking/MDI for Windows Forms Forum

Posted 17 years ago by Enrique Nieto
Avatar
I need to save a custom data in xml, in the previous version of dockable control I had xml property <child-name> with the class information to reload the previous state. I can't find this property in the actual layout xml file in this version. Exists?

I can resolve it in other way but I need to save this information in the event SaveCustomToolWindowLayoutData but when I try to access to the ToolWindowLayoutData the SaveCustomToolWindowLayoutData raise again and again and again... How can i resolve it?

Comments (4)

Posted 17 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
No in UIStudio the child controls can be set up in the designer so there is no need for a child-name property.

ToolWindowLayoutData gets/sets ALL the layout data. So you should not be accessing it at all in SaveCustomToolWindowLayoutData. Instead, use the e.Writer property in the event handler to write XML data out.


Actipro Software Support

Posted 17 years ago by Enrique Nieto
Avatar
Yes, ok for the second part.
I'm goint to make a copy of the xml in the LoadCustomToolWindowLayoutData because I need to read this data in the SaveCustomToolWindowLayoutData and I can't do this directly.

About the first, I don't design my window, I always generate it in execution, this is my problem, I need to save the reations of my controls and the ToolWindow that contains it and I can't find and easy solution
Posted 17 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Well what you should do is in SaveCustomToolWindowLayoutData use the e.Writer to write out an XML tag for each tool window and indicate the tool window key and whatever data you need. So maybe you end up writing out something like this:

<Data ToolWindowKey="mytoolwindowkey" Value="mycustomdata" />

Then in LoadCustomToolWindowLayoutData, use the reader to read that data and update things appropriately.


Actipro Software Support

Posted 17 years ago by Enrique Nieto
Avatar
Yes, This is the same that I've been doing now but thank you very much for all.
The latest build of this product (v24.1.0) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.