NavigationBar in Docksite

Navigation for WPF Forum

Posted 14 years ago by Daue Dominique
Version: 9.1.0507
Avatar
I tried the following code but i'm not able to have a navigation bar automatically resizing its parent when it is minimized (i.e. the splitcontainer). Is there a solution to this problem ? Thanks.

        <docking:DockSite Name="DockSite">
          <docking:SplitContainer Orientation="Horizontal">
             <docking:ToolWindowContainer>
                  <docking:ToolWindow>
                            <navigation:NavigationBar x:Name="NB">
                               (...)
                            </navigation:NavigationBar>
                  </docking:ToolWindow>
              </docking:ToolWindowContainer>                           
              <docking:Workspace>
                (...)
              </docking:Workspace>     
          </docking:SplitContainer>
        </docking:DockSite>               

Comments (1)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Daue,

Tool windows won't auto-size to their contents. In your layout scenario, I would recommend you have a root DockPanel that contains the NavigationBar with DockPanel.Dock="Left", and then have the DockSite as the control that fills the remaining DockPanel area. This way the layout will auto-adjust as the NavigationBar width changes.

If you wish to allow the user to resize the NavigationBar while expanded, you may wish to use a Grid instead of a DockPanel, similar to how we did in our samples.


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.