Nested Docksites with ToolWindows prevents Auto-Hide support

Docking/MDI for WPF Forum

Posted 10 years ago by Michael Jelley
Version: 14.1.0600
Platform: .NET 4.5
Environment: Windows 7 (64-bit)
Avatar

Hello, I'm seeing a bug with nested dock sites.

I have a DockSite like the one below. In the example, the outermost ToolWindow will expand when the mouse is hovered over. The inner (nested) ToolWindow will not expand, and cannot be opened in any way by the user.

My expectation is that each ToolWindow responds to the mouse hover on its tab by expanding out and displaying the content of the window.

In my application (a more complex variant of the below), a requirement is that we have nested dock sites supporting tool windows both at the outer level, and within each document window, both potentially auto-hidden.

<docking:DockSite Margin="5,5,0,0" x:Name="dockSite" CanDocumentWindowsRaft="True" Padding="0,0,0,1">
   <docking:DockSite.Switcher>
      <docking:SimpleSwitcher />
   </docking:DockSite.Switcher>

   <docking:Workspace>
      <docking:TabbedMdiHost>
         <docking:TabbedMdiContainer>
            <docking:DocumentWindow Title="Test Document">
               <DockPanel>
                  <docking:DockSite>
                     <docking:ToolWindowContainer>
                        <docking:ToolWindow Title="Test Nested Panel">
                           <TextBlock Text="Nested ToolWindow content" />
                        </docking:ToolWindow>
                     </docking:ToolWindowContainer>
                  </docking:DockSite>
      
                  <TextBlock Text="DocumentWindow Content goes here."/>
               </DockPanel>
            </docking:DocumentWindow>
         </docking:TabbedMdiContainer>
      </docking:TabbedMdiHost>
   </docking:Workspace>
   
   <docking:DockSite.AutoHideLeftContainers>
      <docking:ToolWindowContainer>
         <docking:ToolWindow Title="Test Panel">
            <TextBlock Text="ToolWindow Content goes here." />
         </docking:ToolWindow>
      </docking:ToolWindowContainer>
   </docking:DockSite.AutoHideLeftContainers>
</docking:DockSite>

Comments (2)

Posted 10 years ago by Michael Jelley
Avatar

To clarify one point, this only seems to occur if both the outer and nested tool windows are auto-hidden to the *left* side of their respective dock sites. If I auto-hide the nested tool window to the right instead, the expected behavior occurs (each appears when hovered over).

Thanks,
Michael Jelley

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

Hi Michael,

I believe the problem here is that the DockSite doesn't support dynamic measuring.  For instance, you put it within a DockPanel where the DockSite is expected to auto-measure itself and the DockPanel will adjust accordingly.  That scenario isn't supported.  You either need to give a Width to the DockSite, or you need to make the DockSite be the last item in the DockPanel so that it star sizes.  If you do either of those things, everything should work as expected for auto-hide.


Actipro Software Support

The latest build of this product (v24.1.1) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.