This is a migrated thread and some comments may be shown as answers.

Saving Docking State

5 Answers 146 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Simon
Top achievements
Rank 1
Simon asked on 10 May 2009, 12:13 PM
Is there any way to save the state of the DockPanels without saving the state of all the open DocumentPanes.
Basically I want to record the state of all the toolwindows, not the documents.

5 Answers, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 13 May 2009, 12:27 PM
Hi Simon,

Currently, RadDock cannot save the docking state of the DockPanels only. We will research this scenario in order to address the feature in one of our next releases. However, I cannot provide you with a specific time frame.

If you have additional questions, feel free to contact me.

All the best,
Nikolay
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Marco
Top achievements
Rank 2
Veteran
answered on 05 May 2014, 02:46 PM
Don't know if this feature has been implemented but I'm looking for something like this.

I have an application using the docking system. All the Windows are constructed from a FormControl. The ToolWindows are stateless but the documentWindows aren't...

I can load the content (FormControl) of my ToolWindows with the following tutorial (reload the windows content from the name which is serialized).
http://www.telerik.com/help/winforms/dock-loading-and-saving-layouts-tutorial-saving-and-loading-layout-content.html

But I don't know what's the best way for handling my documentWindows.

Should I close theses Windows before saving the layout ? Is there a way to add serialized data object with the layout so we can set these data back after Layout and ContentControl loading ?

Thanks for reading
0
George
Telerik team
answered on 08 May 2014, 09:57 AM
Hello Marco,

Thank you for writing.

Currently, RadDock does not support functionality for saving the positions of DocumentWindows. The control is inspired from the docking abilities of Visual Studio and iн it, DocumentWindows does not remember their positions, and every time you close one, even if you reopen it, it will be placed in the main document area as new tabbed window. 

We have a feature request for this functionality in our Feedback Portal. You can find it here. Feel free to add your votes or comments.

For the time being the only suggestion I can give you is to manage the document windows by adding them with the AddDocument method by specifying the desired position and then by loading the content of the windows.

Let me know if you have further questions.

Kind regards,
George
the Telerik team
 
Q3’10 SP1 of RadControls for WinForms is available for download; also available is the Q1'11 Roadmap for Telerik Windows Forms controls.
 
0
Marco
Top achievements
Rank 2
Veteran
answered on 08 May 2014, 10:13 AM
Hi George,

I don't want to save the position of a DocumentWindows (You are right, who care of the position of the tabbed document in Visual Studio ?)

I just want to be able to save/serialize data linked to the DocumentWindows (What's the meaning of saving a DocumentWindows if you can't restore the state of the data inside? Visual Studio do not open empty tabbedDocument on startup, they are filled with your code (or something else )!)

OR 

Ignoring all DocumentWindows when serializing the layout (just keeping the "toolbox"). Application only save the toolbox configuration, not the documents which were opened on last session. 
0
George
Telerik team
answered on 13 May 2014, 10:28 AM
Hello Marco,

Thank you for your reply.

In this situation in case the document windows are serialized you can use the approach from the help article (Tutorial: Saving and Loading Layout and Content). The only difference is that you will need to enumerate the DocumentWindows, instead of the DockWindows. The DocumentArray​ property can be used:
this.RadDock.DocumentManager.DocumentArray

In case you do not want to serialize the DocumentWindows, you can close the prior saving the layout:
this.RadDock.RemoveAllDocumentWindows(DockWindowCloseAction.CloseAndDispose);
 
this.RadDock.SaveToXml("xml.xml");

Let me know if you require further assistance.

Regards,
George
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
Dock
Asked by
Simon
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Marco
Top achievements
Rank 2
Veteran
George
Telerik team
Share this question
or