Saving the ToolWindowLayout to a file

Docking/MDI for Windows Forms Forum

Posted 10 years ago by Justin Bozonier
Version: 2.0.0107
Avatar
When I use the SaveToolWindowLayoutToFile method on my dock manager I get the following xml...

<ToolWindowLayout Version="1.0">
    <LayoutData>
        <HostContainerControl />
        <AutoHide Dock="Left" />
        <AutoHide Dock="Right" />
        <AutoHide Dock="Top" />
        <AutoHide Dock="Bottom" />
        <TabbedDocuments Orientation="Horizontal" />
        <FloatingContainers />
        <Hidden />
    </LayoutData>
    <CustomData />
</ToolWindowLayout>
Obviously, that doesn't do much when I load it. :)

What do I need to do to persist the ToolWindow states to this xml? I have already ensured that I gave them all a key, and they all reference the same dock manager.

Comments (1)

Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Justin,

My guess is you are either calling this on the incorrect DockManager, or you are calling it on the correct DockManager but after its Dispose method has been called, which has cleared the tool windows from the layout and from being tracked. Look for one of those things. Be sure you save the layout before DockManager.Dispose is ever called.


Actipro Software Support

The latest build of this product (v2018.1 build 0341) was released 3 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.