Problem

ToolWindow ContainerMinSize is not respected when window is floating

Posted 1 year 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"
                    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 (3)

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

Hi,

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

Best regards,

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

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
Information The latest build of this product (2018.1 build 0672) was released 2 months ago, which was after the last post in this thread.

Add a Comment

Please log in to a validated account to post comments.