ToolWindow ContainerMinSize is not respected when window is floating

Docking/MDI for WPF Forum

Posted 2 years ago by Shawn Kendrot
Version: 17.1.0651
Platform: .NET 4.5
Environment: Windows 10 (64-bit)
Avatar

Setting the ContainerMinSize has no impact when the the window is floating. It doesn't matter the window is floating initially or docked initially. ContainerMinSize is respected when the window is docked. To reproduce simply set the ContainerMinSize on the tool window. This can be via xaml or code.

 var toolWindow = new ToolWindow(ContentDockSite, "documentOutlineToolWindow", "Document Outline", null, new TextBlock { Text = "Hello World" });
toolWindow.DefaultDockSide = ActiproSoftware.Windows.Controls.Side.Right;
toolWindow.Name = "documentOutlineToolWindow";
toolWindow.ContainerMinSize = new Size(350, 500);

 

<docking:ToolWindow x:Name="documentOutlineToolWindow" TabText="Document Outline" Title="Document Outline" 
                    ContainerMinSize="150, 300"
                    ContainerDockedSize="300,500"
                    Description="Displays the primary document's document outline">
    <TextBox x:Name="documentOutlineTextBox" Grid.Row="1" BorderThickness="0" Text="(none)" AcceptsReturn="True" IsReadOnly="True" 
             FontSize="10" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" />
</docking:ToolWindow>

Comments (4)

Posted 2 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Shawn,

That is correct, the ContainerMinSize will only affect layouts within the containing DockHost (even floating dock hosts), like when you drag splitters.  It doesn't do anything to restrict the WPF Window's size that is wrapping the DockHost at this time though.

I've made a note of your request for this.


Actipro Software Support

Posted 1 year ago by Valéry Sablonnière - Staubli
Avatar

Hi,

A lot of our cutomers need this feature also, do you plan to introduce this feature ?

Best regards,

Posted 1 year ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

This is a tricky problem for floating docking windows, because the floating DockHost is contained by a WPF Window.  There can be a complex nested hierarchy in any floating DockHost, which makes it difficult to know the minimum size.  Maybe there is a way to take our best shot at calculating the minimum size from a given docking hierarchy and then set that to the ancestor WPF Window.  That would need to be done after any layout change.  I'll bump the priority on this request a bit.


Actipro Software Support

Posted 8 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

We are working on floating dock hosts that only contain docked tool window containers to support the minimum size of the contained tool windows.for the next maintenance release.

Please write our support address if you'd like to try a preview build.

[Modified 8 months ago]


Actipro Software Support

The latest build of this product (v2019.1 build 0681) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.