Can We have nested ToolWindows ?

Docking/MDI for WPF Forum

Posted 16 years ago by Pratik
Version: 4.5.0485
Avatar
HI,

as I wanted nested Docking Windows( ToolWindows )in my project i have put demo code here..below



 <docking:ToolWindowContainer Name="ParentContainer" docking:DockSite.ControlSize="850,100" >
                    <docking:ToolWindow Name="ParentTw" Title="XYZ" HasOptions="False" >
                        <docking:SplitContainer >
                            <docking:SplitContainer Orientation="Vertical" >
                                <docking:ToolWindowContainer Name="Child1">
                                    <docking:ToolWindow HasOptions="False" Title="First" >
                                        <docking:ToolWindow.Content>
                                            <TextBlock Text="This is Pratik" ></TextBlock>
                                        </docking:ToolWindow.Content>
                                    </docking:ToolWindow>
                                </docking:ToolWindowContainer>
                                <docking:ToolWindowContainer Name="Child2">
                                    <docking:ToolWindow Title="Second" HasOptions="False" >
                                        <docking:ToolWindow.Content>
                                            <TextBlock Text="This is another Pratik" ></TextBlock>
                                        </docking:ToolWindow.Content>
                                    </docking:ToolWindow>
                                </docking:ToolWindowContainer>
                            </docking:SplitContainer>
                            <docking:Workspace>
                                <Grid>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="*"/>
                                        <RowDefinition Height="Auto"/>
                                    </Grid.RowDefinitions>


                                    <docking:TabbedMdiHost Name="tmhChild">
                                    </docking:TabbedMdiHost>

                                                                  </Grid>
                            </docking:Workspace>
                        </docking:SplitContainer>
                    </docking:ToolWindow>
                </docking:ToolWindowContainer>


above code compiles and runs successfully

but Problems are

1. when I autohide the inner Toolwindow it actually puts Tab out side the parent ToolWindow ... That I wanted inside toolwindow

2. inner toolwindow Autohide is working but when i click on Autohide of outer toolwindow it gives Exception like "Unable to locate the specified control in the AutoHideHost."

Comments (1)

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

The nesting of DockSites can be done easily however you have to pay attention to what controls are allowed to be in what.

First, please see our documentation topic "Control Hierarchy" since that lays out what can be in what. Also we have a "Nested DockSites" QuickStart that shows an example of nesting.

Several incorrect things I can see with your code are:
1) You have no root DockSite
2) You have a SplitContainer in a ToolWindow
3) You have a Grid in a Workspace, and you are trying to have tabbed MDI (the TabbedMdiHost must be a direct child of the Workspace)

Please read our documentation mentioned above and look at our sample as it will get you going the right way.


Actipro Software Support

The latest build of this product (v24.1.3) 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.