Posted 14 years ago
by Ujjwal Lahoti
I have created my GUI using nested SplitContainers. And the bottom of the tree there are ToolWindows which contain the actual content. I am facing challenges to provide proper width to different containers. If I specify Width, then that container gets that Width, but then there is lot of empty space left, which is not occupied by other windows. eg.
In the example above, specifying Width to ToolWindow has no effect. However if I specify width to ToolWindowContainer, then it does take effect for than window, however then other ToolWindows don't resize properly. I am not able provide the layout properly.
Here are some of the things I am trying to do
1. Able to specify Min and Max Widths, and default widths to different Windows. (Both programmatically and in XAML)
2. If the Width/Height due to window resizing goes below the MinWidth/MinHeight requirement, then I want scrollbars to appear
If you have an example, that assigns widths to different Toolwindows in Docking/MDI it would be very useful.
[Modified at 03/31/2010 11:39 PM]
<docking:SplitContainer Orientation="Horizontal" >
<docking:SplitContainer Orientation="Vertical" >
<docking:SplitContainer Orientation="Horizontal" >
<docking:ToolWindowContainer>
<docking:ToolWindow x:Name="rfPhyConfigLeft" Title="RF/Physical Configuration">
<Grid>
</Grid>
</docking:ToolWindow>
</docking:ToolWindowContainer>
<docking:SplitContainer Orientation="Vertical" >
<docking:ToolWindowContainer>
<docking:ToolWindow x:Name="logicalConfig" Title="Logical Configuration">
<Grid>
</Grid>
</docking:ToolWindow>
</docking:ToolWindowContainer>
<docking:SplitContainer Orientation="Horizontal" >
<docking:SplitContainer Orientation="Vertical" >
<docking:ToolWindowContainer>
<docking:ToolWindow x:Name="pdpProfile" Title="Power Delay Profile">
<Grid>
</Grid>
</docking:ToolWindow>
</docking:ToolWindowContainer>
<docking:ToolWindowContainer>
<docking:ToolWindow x:Name="correlation" Background="Cornsilk" Title="Correlation" MinWidth="100" MaxHeight="50">
<Grid Margin="5">
</Grid>
</docking:ToolWindow>
</docking:ToolWindowContainer>
</docking:SplitContainer>
<docking:ToolWindowContainer>
<docking:ToolWindow x:Name="chanPlayer" Title="Channel Player">
</docking:ToolWindow>
</docking:ToolWindowContainer>
</docking:SplitContainer>
</docking:SplitContainer>
</docking:SplitContainer>
<docking:ToolWindowContainer>
<docking:ToolWindow x:Name="testEventsWindow" Title="Test Events" CanClose="False">
<Grid>
</Grid>
</docking:ToolWindow>
</docking:ToolWindowContainer>
</docking:SplitContainer>
<docking:ToolWindowContainer>
<docking:ToolWindow Width="350" MaxWidth="350" x:Name="rfPhyConfigRight" Title="Instrument1: RF Configuration">
<Grid>
</Grid>
</docking:ToolWindow>
</docking:ToolWindowContainer>
</docking:SplitContainer>
Here are some of the things I am trying to do
1. Able to specify Min and Max Widths, and default widths to different Windows. (Both programmatically and in XAML)
2. If the Width/Height due to window resizing goes below the MinWidth/MinHeight requirement, then I want scrollbars to appear
If you have an example, that assigns widths to different Toolwindows in Docking/MDI it would be very useful.
[Modified at 03/31/2010 11:39 PM]