ToolWindow ContainerMinSize is not respected when window is floating

Posted 2 years ago by Avatar Shawn Kendrot

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"
                    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" />

Comments (4)

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

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 11 months ago by Valéry Sablonnière - Staubli


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

Best regards,

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


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 2 months ago by Actipro Software Support - Cleveland, OH, USA


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 2 months ago]

Actipro Software Support
Information The latest build of this product (2018.1 build 0674) was released 1 month ago, which was after the last post in this thread.

Add a Comment

Please log in to a validated account to post comments.