ToolWindowContainer width at start up

Docking/MDI for WPF Forum

Posted 4 years ago by Milen Milkovski
Version: 20.1.0


I'm trying your Docking component and can't find a way on how to size various ToolWindowContainers in my xaml file. As I add

ToolWindowContainer they seem to split available space equally.  How do I split 4:1 ?

       <docking:DockSite x:Name="dockSite" Grid.RowSpan="2" Grid.Row="1" Grid.ColumnSpan="2" RenderTransformOrigin="0.51,0.495">
            <!-- NOTE: Split containers can contain two elements, which are typically ToolWindowContainers (with 1 or more tool windows)
			           and one (and only one) Workspace -->

                    <docking:ToolWindow x:Name="dockedBottom" Title="Docked Bottom">
                        <local:BridgeClub_TableListView x:Name="BridgeClub_TableListView" Margin="0" Width="Auto" Height="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.CanContentScroll="True" UseLayoutRounding="True" RenderTransformOrigin="0.5,0.5">
                                <ImageBrush ImageSource="/SharkBridgeConsole;component/images/Extra_Tournaments_Shark_Logo.png" Opacity="0.48" Stretch="None">

                <docking:ToolWindowContainer x:Name="Tool_Userlist" HasCloseButton="False" HasTitleBarGripper="True" IsTabLayoutAnimationEnabled="True">
                    <docking:ToolWindow x:Name="dockedRight" Title="Docked Right">
                        <local:BridgeClub_LobbyUserList x:Name="BridgeClub_LobbyUserList" Margin="1,1,1,1.5" Width="Auto" Height="Auto" Grid.Row="2" Padding="0" FontSize="18" Grid.Column="1" IsEnabled="{Binding ConnectedConsole}"/>



Comments (1)

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


The ToolWindow class has a ContainerDockedSize property that can be set to indicate the target size of the parent container when the tool window is docked.  When no Workspace is within the DockSite, as in this case, the ToolWindowContainers will be arranged by percentage.  Since there are two containers, and the ContainerDockedSizes are the same default values right now, they will be split 50/50.  If you adjust the ContainerDockedSize so the value for one the tool window is four times the value for the other tool window, then it will arrange how you want.

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.