RestoreLayout with 'ShowHeader'

Nov 10, 2010 at 7:09 PM

I have a control that uses several resizing panels with dockablepanes sprinkled on the left/right and bottom, with a 'Main' DocumentPane/DocumentContent in the center.  I want the users to be able to mess with the dockable panes, meaning moving it around, floating, etc, but i don't want them to be able to move the 'Main' Documentpane in the center.  So i set 'showheader' equal to false, and that's good enough for me.

the problem is that i want to save the layout, and restore it as well.  The save/restore works perfectly EXCEPT 'showheader' is set to true, and setting it to false programmatically doesn't seem to do anything.

Anyone seen anything like this, or have any ideas?  my docking layout xml is below, if that helps:

<DockingManager version="1.3.0">
    <ResizingPanel ResizeWidth="*" ResizeHeight="*" EffectiveSize="1640,870" Orientation="Vertical">
        <ResizingPanel ResizeWidth="*" ResizeHeight="*" EffectiveSize="1660,765.516666666667" Orientation="Horizontal">
            <ResizingPanel ResizeWidth="0.167128987517337*" ResizeHeight="*" EffectiveSize="275.428571428571,765.516666666667" Orientation="Vertical">
                <DockablePane ResizeWidth="0.25*" ResizeHeight="0.25*" EffectiveSize="275.428571428571,186.879166666667" ID="7f7a39e8-a55c-4670-b827-b795f73a1e47" Anchor="Left" IsAutoHidden="false">
                    <DockableContent Name="dckAlertCont" FloatingWindowSize="250,400" />
                </DockablePane>
                <DockablePane ResizeWidth="0.25*" ResizeHeight="0.25*" EffectiveSize="275.428571428571,186.879166666667" ID="b1843147-61a0-4953-b609-21de14406269" Anchor="Left" IsAutoHidden="false">
                    <DockableContent Name="dckAttCont" FloatingWindowSize="250,400" />
                </DockablePane>
                <DockablePane ResizeWidth="0.25*" ResizeHeight="0.25*" EffectiveSize="275.428571428571,186.879166666667" ID="dfe5616e-f13f-4469-867f-3119739036d1" Anchor="Left" IsAutoHidden="false">
                    <DockableContent Name="dckLocCont" FloatingWindowSize="250,400" />
                </DockablePane>
                <DockablePane ResizeWidth="0.25*" ResizeHeight="0.25*" EffectiveSize="275.428571428571,186.879166666667" ID="34446fd2-312b-4825-af48-f71f07bccd5d" Anchor="Left" IsAutoHidden="false">
                    <DockableContent Name="dckStatCont" FloatingWindowSize="250,400" />
                </DockablePane>
            </ResizingPanel>
            <DocumentPane IsMain="true" ResizeWidth="0.702149791955617*" ResizeHeight="*" EffectiveSize="1157.14285714286,765.516666666667">
                <DocumentContent Name="docMiddleCont" />
            </DocumentPane>
            <ResizingPanel ResizeWidth="0.130721220527046*" ResizeHeight="*" EffectiveSize="215.428571428571,765.516666666667" Orientation="Vertical">
                <DockablePane ResizeWidth="0.5*" ResizeHeight="*" EffectiveSize="215.428571428571,379.758333333333" ID="74115e5d-0787-4a50-8f31-79e001fea3d5" Anchor="Right" IsAutoHidden="false">
                    <DockableContent Name="dckStickyCont" FloatingWindowSize="250,400" />
                </DockablePane>
                <DockablePane ResizeWidth="0.5*" ResizeHeight="*" EffectiveSize="215.428571428571,379.758333333333" ID="3147156c-b549-42aa-8456-16b0fa53bcee" Anchor="Right" IsAutoHidden="false">
                    <DockableContent Name="dckTestCont" FloatingWindowSize="250,400" />
                </DockablePane>
            </ResizingPanel>
        </ResizingPanel>
        <DockablePane ResizeWidth="*" ResizeHeight="100" EffectiveSize="1660,100" ID="16c71b98-6d8c-4661-b81b-203754449c0d" Anchor="Bottom" IsAutoHidden="false">
            <DockableContent Name="dckBottomCont" FloatingWindowSize="250,400" />
        </DockablePane>
    </ResizingPanel>
    <Hidden />
    <Windows />
</DockingManager>

 

Dec 11, 2010 at 3:35 AM

Hello. I'm also have the same problem with RestoreLayout and still waitng for an answer on my thread:

http://avalondock.codeplex.com/Thread/View.aspx?ThreadId=232347

Mar 1, 2011 at 4:20 PM

there was never any response to this message, but i ended up getting the latest source code and fixing it myself.  2 additions in 'DockingManager.cs', which seems to work for me:

line 3164

xmlWriter.WriteAttributeString("ShowHeader", pane.ShowHeader.ToString());

line 3514

if (mainElement.HasAttribute("ShowHeader"))
                documentPane.ShowHeader = Convert.ToBoolean(mainElement.GetAttribute("ShowHeader"));