ToolWindowContainer width at start up

Docking/MDI for WPF Forum

The latest build of this product (v2020.1.0) was released 17 days ago, which was before this thread was created.
Posted 12 days ago by Milen Milkovski
Version: 20.1.0
Avatar

Hi,

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:SplitContainer>

                <docking:ToolWindowContainer>
                    <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">
                            <local:BridgeClub_TableListView.Background>
                                <ImageBrush ImageSource="/SharkBridgeConsole;component/images/Extra_Tournaments_Shark_Logo.png" Opacity="0.48" Stretch="None">
                                    <ImageBrush.RelativeTransform>
                                        <TransformGroup>
                                            <ScaleTransform/>
                                            <SkewTransform/>
                                            <RotateTransform/>
                                            <TranslateTransform/>
                                        </TransformGroup>
                                    </ImageBrush.RelativeTransform>
                                </ImageBrush>
                            </local:BridgeClub_TableListView.Background>
                        </local:BridgeClub_TableListView>
                    </docking:ToolWindow>
                </docking:ToolWindowContainer>

                <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}"/>
                    </docking:ToolWindow>
                </docking:ToolWindowContainer>

            </docking:SplitContainer>

        </docking:DockSite>

Comments (1)

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

Hello,

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

Add Comment

Please log in to a validated account to post comments.