CompositeWPF - Getting your view to stretch vertically as well as horizontally

My primary view (loaded in the Shell's MainRegion) looked as follows; I want my menu bar at the top, a status bar at the bottom and the ProcessSolutionRegion contents to fill in the middle:

The result follows - not exactly what I was expection or needing...  I need my status bar to be at the bottom.

If I were to wrap my Grid with a DockPanel and specify a height I get what I'm looking for - at least until I resize my Window....

FYI, wrapping the ItemsControl in the Shell doesn't work:

<DockPanel Height="265">
<ItemsControl Name="MainRegion"
            cal:RegionManager.RegionName="{x:Static local:RegionNames.MainRegion}"/>
</DockPanel>

I have to add a Template to my ItemsControl element to get my desired results:

<Window x:Class="ShellApp.Shell"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:cal="http://www.codeplex.com/CompositeWPF"
    xmlns:local="clr-namespace:ShellApp"
    Name="myShell" Title="GWN App" Height="300" Width="300">
   
    <ItemsControl Name="MainRegion"
            cal:RegionManager.RegionName="{x:Static local:RegionNames.MainRegion}">
       
        <ItemsControl.ItemsPanel>
            <ItemsPanelTemplate>
                <DockPanel/>
            </ItemsPanelTemplate>
        </ItemsControl.ItemsPanel>
       
    </ItemsControl>
</Window>

 


Tags: , , ,
Categories: CompositeWPF | WPF


Actions: E-mail | Permalink |  Grammar/Typo/Better way? Please let me know