Problems with document window resizing

Docking/MDI for WPF Forum

Posted 14 years ago by Andreas Dickau
Version: 9.1.0507
Hi All,

I'm trying to display a number of MDI windows without their title bar. My main window contains the following XAML code overriding the template for docking:DocumentWindow

<DockPanel Width="Auto" Height="Auto">
                <docking:DockSite Name="MainWindowDockSite" DockPanel.Dock="Left" CanToolWindowsDrag="False">
                            <docking:ToolWindow x:Name="toolboxToolWindow" Title="Toolbox" CanDockRight="False" CanDockTop="False" CanDrag="False" CanDockBottom="False" CanDockLeft="True" CanClose="False" CanBecomeDocument="False" CanAutoHide="True" HasOptions="False">
                                    <ContentControl Name="WDLMenu" MinWidth="150" />
                        <docking:StandardMdiHost Background="Peru" Name="MdiHost">
                                <Style TargetType="docking:DocumentWindow">
                                    <Setter Property="Template">
                                            <ControlTemplate TargetType="docking:DocumentWindow" >
                                                <ctl:ResizableContentControl  BorderBrush="DarkRed" Width="Auto" Height="Auto" HorizontalAlignment="Left" VerticalAlignment="Top" CanAutoSize="True" BorderThickness="4" Content="{TemplateBinding Content}" ResizeMode="Both" />
                            </docking:StandardMdiHost.Resources>                        </docking:StandardMdiHost>
In the code behind module I create the document window as follows
DocumentWindow toolWindow = new DocumentWindow(MainWnd.MainWindowDockSite, name, title,
              new BitmapImage(new Uri("/Resources/Images/TextDocument16.png", UriKind.Relative)), myCtrl);
myCtrl.MinWidth = 100;
myCtrl.MinHeight = 100;
myCtrl is a UserControl that also handles the window dragging.

Whenever I try to drag the sizing handle, my UserControl window is being resized at a faster rate than the outside MDI window.

Could someone please give me a hint to what I'm doing wrong

Thanks for your help


Comments (1)

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

Are you sure you are setting e.Handled = true in your sizing routines?

If that doesn't help, for complex questions like this that require a repro, please always just email us with a simple sample project that shows the issue.

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.