Resize the ToolWindowContainer int the dockSite

Docking/MDI for WPF Forum

Posted 5 years ago by michael
Version: 14.2.0611
Avatar

Hello,

I'm trying your control actually but i nearly sure to buy (better for me than devexpress, infragistic, telerik, componentone, xceed, great job guys ! ) 

Can you help me ? ;-)

How can i set the width of my ToolWindowContainer ? 

 

<docking:DockSite x:Name="dockSite"
                          Grid.Row="1">
            <docking:DockSite.AutoHideLeftContainers>
                <docking:ToolWindowContainer>
                    <docking:ToolWindow Title="Selection materiel" />
                </docking:ToolWindowContainer>
            </docking:DockSite.AutoHideLeftContainers>
            <docking:DockSite.AutoHideBottomContainers>
                <docking:ToolWindowContainer>
                    <docking:ToolWindow Title="Tool Window 11" />
                </docking:ToolWindowContainer>
            </docking:DockSite.AutoHideBottomContainers>

            <docking:SplitContainer>
                <docking:SplitContainer Orientation="Vertical">
                    <docking:ToolWindowContainer>
                        <docking:ToolWindow Title="Tool Window 1" />
                    </docking:ToolWindowContainer>

                    <docking:ToolWindowContainer>
                        <docking:ToolWindow Title="Tool Window 5" />
                    </docking:ToolWindowContainer>
                </docking:SplitContainer>

                <docking:SplitContainer Orientation="Vertical">
                    <docking:ToolWindowContainer>
                        <docking:ToolWindow Title="Tool Window 12" Width="auto">
                            <TextBlock Width="10" />
                        </docking:ToolWindow>
                        <docking:ToolWindow Title="Tool Window 12"
                                            Width="auto">
                            <TextBlock Width="10" />
                        </docking:ToolWindow>
                    </docking:ToolWindowContainer>
                    <docking:ToolWindowContainer>
                        <docking:ToolWindow Title="Tool Window 52" />
                    </docking:ToolWindowContainer>
                </docking:SplitContainer>
            </docking:SplitContainer>
        </docking:DockSite>

 Actuallly, the panels on each side have the same width and the same height.

How can i change it ? if i set the width for example, it will resize the panel but not adjust the other on this one.

 

Any idea ? :-) 

Comments (2)

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

Hi Michael,

You can't set properties like Width on the ToolWindow classes since ToolWindow is represented in UI by a tab, so you would effectively be forcing a tab width with that.  Take a look at the "Docking Window Features / Lifecycle and Docking Management" topic in the Docking/MDI documentation that comes with the product.  The last section there is called "Setting Docking Window Initial Sizes" and tells you about an attached property you can set on the ToolWindowContainer.

If you don't have a Workspace somewhere in your DockSite, then your tool windows will be in tool window inner fill mode.  In that case, the initial sizes you set with that attached properly will likely be relative to each other.  For instance a width of 100 on a left container and a width of 200 on a right container means the right will be twice as large as the left.

If you instead have a Workspace somewhere in the DockSite, the sizes specified in the attached property will be the size that the container actually becomes.


Actipro Software Support

Posted 5 years ago by michael
Avatar

Hello and thank you for your help

i used the attached property on the splitContainer and it works fine :

 

<docking:DockSite x:Name="dockSite"
                          Grid.Row="1">

            <docking:DockSite.AutoHideLeftContainers>
                <docking:ToolWindowContainer>
                    <docking:ToolWindow Title="Selection materiel" Name="Tw_SelectMat"/>
                </docking:ToolWindowContainer>
            </docking:DockSite.AutoHideLeftContainers>
            <docking:DockSite.AutoHideBottomContainers>
                <docking:ToolWindowContainer>
                    <docking:ToolWindow Title="Tool Window 11" Name="tw_Notification"/>
                </docking:ToolWindowContainer>
            </docking:DockSite.AutoHideBottomContainers>

            <docking:SplitContainer Orientation="Horizontal">
                <docking:SplitContainer Orientation="Vertical"
                                        docking:DockSite.ControlSize="100, 50">
                    <docking:ToolWindowContainer >
                        <docking:ToolWindow Title="Tool Window 12"
                                            Name="Tw_FicheTech">
                        </docking:ToolWindow>
                    </docking:ToolWindowContainer >
                    <docking:ToolWindowContainer >
                        <docking:ToolWindow Title="Tool Window 52"
                                            Name="Tw_Configuration" />
                    </docking:ToolWindowContainer>
                </docking:SplitContainer>

                <docking:SplitContainer Orientation="Vertical"
                                        docking:DockSite.ControlSize="30, 50">
                    <docking:ToolWindowContainer >
                        <docking:ToolWindow Title="Tool Window 1"
                                            Name="Tw_InfoDossier"/>
                    </docking:ToolWindowContainer>

                    <docking:ToolWindowContainer >
                        <docking:ToolWindow Title="Tool Window 5"
                                            Name="Tw_Sommes"/>
                    </docking:ToolWindowContainer>
                </docking:SplitContainer>
            </docking:SplitContainer>
        </docking:DockSite>
The latest build of this product (v2019.1 build 0683) 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.