Restoring ResizingPanel

Feb 10, 2011 at 2:15 AM

I'm having trouble restoring my application.

This is what my window looks like when I first launch the application and move my dockable panel outside the main window.
http://sludgemonsters.com/images/before.jpg

When I reopen the window, it's nearly there.
http://sludgemonsters.com/images/after.jpg

However, as you can probably notice, My main document content becomes a dockable panel.

 This is my xaml.

<ad:DockingManager x:Name="dockManager" Grid.Row="1" Loaded="DockManager_Loaded">
            <ad:ResizingPanel x:Name="resPanel" Orientation="Horizontal">
                <ad:DockablePane x:Name="mainDockPane" ad:ResizingPanel.ResizeWidth="200">
                    <!-- Object properties -->
                    <ad:DockableContent x:Name="objectPropertyContent" Title="Object Properties">
                        <local:GameObjectPropertyGroup x:Name="objectPropertyGrid" Scope="PGS_All" ShowDescription="True"/>
                    </ad:DockableContent>
                    <!-- Level properties -->
                    <ad:DockableContent x:Name="levelPropertyContent" Title="Level Properties">
                        <wpg:PropertyGrid x:Name="levelPropertyGrid" ShowDescription="True"/>
                    </ad:DockableContent>
                    <!-- Layer properties -->
                    <ad:DockableContent x:Name="layerPropertyContent" Title="Layer Properties">
                        <wpg:PropertyGrid x:Name="layerPropertyGrid" ShowDescription="True"/>
                    </ad:DockableContent>
                    <!-- Project browser -->
                    <ad:DockableContent x:Name="projectBrowserContent" Title="Project">
                        <local:ProjectTreeView x:Name="projectBrowser">
                        </local:ProjectTreeView>
                    </ad:DockableContent>
                </ad:DockablePane>
                <ad:DocumentPane x:Name="levelDocPane" AllowDrop="True" ShowHeader="False">
                    <ad:DocumentContent x:Name="levelDoc" Title="Level">
                        <local:LevelEditorControl x:Name="levelControl"/>
                    </ad:DocumentContent>
                </ad:DocumentPane>
            </ad:ResizingPanel>
        </ad:DockingManager>

And this is what my saved layout looks like one I save it.

<DockingManager version="1.3.0">
    <ResizingPanel ResizeWidth="*" ResizeHeight="*" EffectiveSize="0,0" Orientation="Horizontal">
        <DockablePane ResizeWidth="200" ResizeHeight="*" EffectiveSize="200,548" ID="4e968909-d344-42af-81e3-5dbe43d49a6f" Anchor="Left" IsAutoHidden="false" />
        <DocumentPane IsMain="true" ResizeWidth="*" ResizeHeight="*" EffectiveSize="806,548">
            <DocumentContent Name="levelDoc" />
        </DocumentPane>
    </ResizingPanel>
    <Hidden />
    <Windows>
        <FloatingWindow IsDockableWindow="true" Top="114" Left="246" Width="249" Height="628">
            <DockablePane ResizeWidth="*" ResizeHeight="*" EffectiveSize="249,628" ID="456224fa-48b1-43ce-9118-9c0f4d9244a8" Anchor="None" SelectedIndex="3" IsAutoHidden="false">
                <DockableContent Name="objectPropertyContent" FloatingWindowSize="249,628" ChildIndex="0" Width="200" Height="548" Anchor="Left" State="Docked" ContainerPaneID="4e968909-d344-42af-81e3-5dbe43d49a6f" />
                <DockableContent Name="levelPropertyContent" FloatingWindowSize="249,628" ChildIndex="0" Width="200" Height="548" Anchor="Left" State="Docked" ContainerPaneID="4e968909-d344-42af-81e3-5dbe43d49a6f" />
                <DockableContent Name="layerPropertyContent" FloatingWindowSize="249,628" ChildIndex="0" Width="200" Height="548" Anchor="Left" State="Docked" ContainerPaneID="4e968909-d344-42af-81e3-5dbe43d49a6f" />
                <DockableContent Name="projectBrowserContent" FloatingWindowSize="249,628" ChildIndex="0" Width="200" Height="548" Anchor="Left" State="Docked" ContainerPaneID="4e968909-d344-42af-81e3-5dbe43d49a6f" />
            </DockablePane>
        </FloatingWindow>
    </Windows>
</DockingManager>

I would really appreciate it if anyone could give me a hand with this.

Thanks