AutoHide by default

Mar 10, 2010 at 10:47 PM

Hi there,

I have DockableContent inside DockablePane inside ResizablePanel. How can I make the DockableContent show up in auto-hide mode on load?

I've tried setting DockableContent.DockableStyle="AutoHide" but it didn't help.

Thanks.

Mar 30, 2010 at 11:58 AM

 

         AvalonDock.DockablePane containerPane =
            base.ContainerPane as AvalonDock.DockablePane;
         if (containerPane != null)
         {
            AvalonDock.DockingManager dockMgr = containerPane.GetManager();
            if (dockMgr != null)
            {
               if (!containerPane.IsSurfaceVisible)
               {
                  dockMgr.ToggleAutoHide(containerPane);
               }
               base.SetAsActive();
            }
         }

 

You can try something like that:

 

         AvalonDock.DockablePane containerPane =
            base.ContainerPane as AvalonDock.DockablePane;
         if (containerPane != null)
         {
            AvalonDock.DockingManager dockMgr = containerPane.GetManager();
            if (dockMgr != null)
            {
               if (!containerPane.IsSurfaceVisible)
               {
                  dockMgr.ToggleAutoHide(containerPane);
               }
               base.SetAsActive();
            }
         }

Where "base.ContainerPane" is a property of AvalonDock.DockableContent (actualy of AvalonDock..Pane).