Set Height of Dockable ToolBar Section

Dec 23, 2008 at 11:47 PM

I'm using AvalonDock in my WPF Application to allow for moving and docking sections of my MainWindow.
I have a Menu section that's not in the <DockingManager> and then I have a ToolBar and TextBox in the <DockinManager>.
My ToolBar is displaying in about 1/3 of the Window and the TextBox displays in the other 2/3 of the Window.

I only want my ToolBar to have a height of about 60 (Height="60").
I tried adding Height="60" to the ToolBar element, DockablePanel element (not at the same time) but it made no difference.

Is there a way to change the height of one of my sections?

Here's my XAML code.


Window x:Class="MainWindow"
Title="AvalonDock Test RG" Height="800" Width="800" WindowStartupLocation="CenterScreen" >
    <DockPanel LastChildFill="True" >
<ScaleTransform ScaleX="1" ScaleY="1" />



        <!-- Menu Items -->
<Menu DockPanel.Dock="Top">
<MenuItem Header="File" Click="FileExit_Click">
<ad:DockingManager x:Name="dockManager">
<ad:ResizingPanel Orientation="Vertical">
<ad:DockableContent Name="dcToolBar" Title="ToolBar">
<Button Content="Close" Click="FileExit_Click" />
<Button Content="Print" Click="Print_Click" />
<ad:DockableContent Title="TextBox1">
<TextBox />

Any suggestions will be greatly appreciated!


Dec 24, 2008 at 2:27 PM
Try setting attached property that informs parent ResizingPanel that control wants described height.

            <ad:ResizingPanel Orientation="Vertical">
               <ad:DockablePane ad:ResizingPanel.Height="60">
Dec 29, 2008 at 3:36 PM
Thank you Zintus! That worked perfectly.