Saving Docking State

6 posts, 0 answers
  1. Simon
    Simon avatar
    6 posts
    Member since:
    Dec 2008

    Posted 10 May 2009 Link to this post

    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.
  2. Nikolay
    Admin
    Nikolay avatar
    1804 posts

    Posted 13 May 2009 Link to this post

    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.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Marco
    Marco avatar
    87 posts
    Member since:
    Apr 2011

    Posted 05 May 2014 in reply to Nikolay Link to this post

    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
  5. George
    Admin
    George avatar
    500 posts

    Posted 08 May 2014 Link to this post

    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.
     
  6. Marco
    Marco avatar
    87 posts
    Member since:
    Apr 2011

    Posted 08 May 2014 in reply to George Link to this post

    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. 
  7. George
    Admin
    George avatar
    500 posts

    Posted 13 May 2014 Link to this post

    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.
     
Back to Top
UI for WinForms is Visual Studio 2017 Ready