Problems with document window resizing

Docking/MDI for WPF Forum

Posted 15 years ago by Andreas Dickau
Version: 9.1.0507
Avatar
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

XAML:
-----
<DockPanel Width="Auto" Height="Auto">
                <docking:DockSite Name="MainWindowDockSite" DockPanel.Dock="Left" CanToolWindowsDrag="False">
                    <docking:DockSite.AutoHideLeftContainers>
                        <docking:ToolWindowContainer>
                            <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:ToolWindow>
                        </docking:ToolWindowContainer>
                    </docking:DockSite.AutoHideLeftContainers>
                    <docking:Workspace>
                        <docking:StandardMdiHost Background="Peru" Name="MdiHost">
                            <docking:StandardMdiHost.Resources>
                                <Style TargetType="docking:DocumentWindow">
                                    <Setter Property="Template">
                                        <Setter.Value>
                                            <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" />
                                             </ControlTemplate>
                                        </Setter.Value>
                                    </Setter>
                                </Style>
                            </docking:StandardMdiHost.Resources>                        </docking:StandardMdiHost>
                    </docking:Workspace>
                </docking:DockSite> 
                
            </DockPanel>
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;
toolWindow.Activate();
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

Andreas

Comments (1)

Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
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.4) was released 30 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.