DockableContent.Show not working

Nov 11, 2010 at 4:01 PM

I'm switching from 1.2 to 1.3 and finding some problems with showing dockable content.

With V1.2 the following worked fine:

DockableContent content = Parent as DockableContent;

if (content != null)
{
     dockingManager.Show(content);
}

With V1.3 I've changed it to:

DockableContent content = Parent as DockableContent;

if (content != null)
{
     if (content.IsVisible)
     {
          content.Activate();
     }
     else
     {
          // Broken with AvalonDock 1.3
          content.Show();
     }
}

 The content.Activate() works (provided it's visible), however, the content.Show() seems to do nothing, the pane does not return if it was closed by clicking on its closs icon.

Nov 11, 2010 at 7:50 PM

        <avalon:DockingManager>
            <avalon:ResizingPanel>
                <avalon:ResizingPanel>
                    <avalon:DocumentPane>
                        <avalon:DockableContent Title="Red" Name="RedContent">
                            <local:RedControl />
                        </avalon:DockableContent>
                        <avalon:DockableContent Title="Green" Name="GreenContent">
                            <local:GreenControl />
                        </avalon:DockableContent>
                        <avalon:DockableContent Title="Blue" Name="BlueContent">
                            <local:BlueControl />
                        </avalon:DockableContent>
                    </avalon:DocumentPane>
                </avalon:ResizingPanel>
                <avalon:ResizingPanel>
                    <avalon:DockablePane>
                        <avalon:DockableContent Title="Gray" Name="GrayContent">
                            <local:GrayControl />
                        </avalon:DockableContent>
                    </avalon:DockablePane>
                </avalon:ResizingPanel>
            </avalon:ResizingPanel>
        </avalon:DockingManager>

The above is a fragment of the XAML setting this up. In 1.3, it is very difficult to drag the red/green/blue tabs, and if you close one of them, it won't reopen with DockingContent.Show(); it WILL if you can manage to drag the tab away.

I suspect it's my use of DocumentPane - how do I get tear off tabs in a document pane?