ToolWindowContainer Resize issue.

Docking/MDI for WPF Forum

Posted 16 years ago by Ronak Patel
Avatar
In this code. I want to Make sure the Second ToolWindowContainer has Height of 150 MinHeight of 100 and MaxHeight of 500
But they are not working property. Also when I resize the height of the window this Second ToolWindowContainer also adjusts its height accordingly.
I don’t want to change the size of second ToolWindowContainer when height is changed. User can only change its height using Splitter.

<Window x:Class="DockingTest.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:docking="clr-namespace:ActiproSoftware.Windows.Controls.Docking;assembly=ActiproSoftware.Docking.Wpf30"
    Width="800" Height="600" Title="Window1">
    <Grid>


        <DockPanel >

            <docking:DockSite Background="Gray" ToolWindowsHaveOptions="False" CanToolWindowsClose="False" CanToolWindowsAutoHide="False"  >
                <docking:DockSite.ToolWindowTransitionSelector>
                    <docking:ToolWindowTransitionSelector />
                </docking:DockSite.ToolWindowTransitionSelector>
                <docking:SplitContainer Orientation="Vertical">
                   
                    <docking:ToolWindowContainer BorderBrush="Transparent" BorderThickness="0">                        
                        <docking:ToolWindow Title="Fixed" CanAttach="False" CanDrag="False" HasTitleBar="False">
                            <ListView  DockPanel.Dock="Top" >
                                <ListViewItem>Ronak</ListViewItem>
                                <ListViewItem>Ronak</ListViewItem>
                                <ListViewItem>Ronak</ListViewItem>
                                <ListViewItem>Ronak</ListViewItem>
                                <ListViewItem>Ronak</ListViewItem>
                                <ListViewItem>Ronak</ListViewItem>
                                <ListViewItem>Ronak</ListViewItem>
                                <ListViewItem>Ronak</ListViewItem>
                                <ListViewItem>Ronak</ListViewItem>
                                <ListViewItem>Ronak</ListViewItem>
                                <ListViewItem>Ronak</ListViewItem>
                                <ListViewItem>Ronak</ListViewItem>
                                <ListViewItem>Ronak</ListViewItem>
                                <ListViewItem>Ronak</ListViewItem>
                                <ListViewItem>Ronak</ListViewItem>
                                <ListViewItem>Ronak</ListViewItem>
                            </ListView>
                      </docking:ToolWindow>                   
                    </docking:ToolWindowContainer>
                    
                     <docking:ToolWindowContainer BorderBrush="Transparent" BorderThickness="0" TitleBarBackgroundActive="Gray" TitleBarBackgroundInactive="Gray" TitleBarForegroundInactive="White" TitleBarForegroundActive="White"> 
                        <docking:ToolWindow Title="Tool Window 1" MouseDoubleClick="ToolWindow_MouseDoubleClick" CanDockLeft="False" CanDockRight="False" CanDockTop="False">
                            <TextBlock>Ronak</TextBlock>
                        </docking:ToolWindow>
                        <docking:ToolWindow Title="Tool Window 2" MouseDoubleClick="ToolWindow_MouseDoubleClick" CanDockLeft="False" CanDockRight="False" CanDockTop="False">
                            <TextBlock>Patel</TextBlock>                            
                        </docking:ToolWindow>
                    </docking:ToolWindowContainer>  
                       
                        
                 </docking:SplitContainer>
            </docking:DockSite>
            </DockPanel>           
       
    </Grid>
</Window>

Comments (3)

Posted 16 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Ronak,

Unfortunately fixed sizes and size constraints are not currently supported. We will add this to the TODO list to look into for possible future inclusion.


Actipro Software Support

Posted 11 years ago by George
Avatar

It's been 5 years since this thread. I would like to know if this functionality has now been implemented. In my case, I have SplitContainer with Horizontal orientation. I would like the left side's width to be one third the size of the SplitContainer or a given width.

Is there a way to achieve this currently?

Thanks

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

Hi George,

While fixed and min sizes aren't supported, we do support programmatic layout of a particular SplitContainer via its ResizeSlots method.  You can pass it a set of numbers to determine the size ratios to apply to children based on the current SplitContainer size.  Check out the ProgrammaticSizing QuickStart for an example.


Actipro Software Support

The latest build of this product (v24.1.2) was released 2 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.