Shrinking ToolWindows

Docking/MDI for WPF Forum

Posted 15 years ago by Mark Benda
Version: 9.1.0505
I have undocked ToolWindows that I open and close depending on the status of my tool window view model. Each time the window is closed then re-opened, the ToolWindow size is shrunken by several pixels.

Here's my example code, every time you click the button to open/close the toolwindow the size gets smaller.
Thanks in adavance!

Here's the Xaml

<Window x:Class="ToolWindowTest.Window1"
    Title="Window1" Height="300" Width="300">
            <RowDefinition Height="30"/>
        <Button Grid.Row="0" Width="Auto" Grid.Column="0" HorizontalAlignment="Left" Click="Button_Click">
    <DockPanel Grid.Row="1" Grid.ColumnSpan="2">
        <docking:DockSite x:Name="dockSite" UseHostedRaftingWindows="True">
                    <docking:ToolWindowContainer x:Name="toolWindowContainer"/>
                        <docking:TabbedMdiContainer x:Name="tabbedMdiContainer"/>

And the code behind

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using ActiproSoftware.Windows.Controls.Docking;

namespace ToolWindowTest
    /// <summary>
    /// Interaction logic for Window1.xaml
    /// </summary>
    public partial class Window1 : Window
        ToolWindow tw;
        public Window1()
            tw = new ToolWindow(dockSite, "toolWindow", "Tool Window", null, "Empty Tool Window");
            tw.CanRaft = true;


        private void Button_Click(object sender, RoutedEventArgs e)
            if (tw != null)
                if (tw.IsOpen == true)

Comments (1)

Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Hi Mark,

Thanks for the bug report and sample. We actually found this issue while building Visual Studio 2010 features. This issue will be fixed in that release, which will be after the next maintenance release. We will notify you when it's fixed.

Actipro Software Support

The latest build of this product (v24.1.2) 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.