title: Need UI alignment help with WPF
body: <p>In my WPF application (XAML posted below), I have a List View and below that I have some labels and text boxes. Everything below the ListView should anchor to the bottom of the window. Everything above the ListView needs to anchor to the top of the window. The ListView itself needs to expand vertically to fill in the space between. When I resize my window vertically, the only thing that should be changing size is the list view.</p>
  
  <p>I keep everything in a stack panel at the root, but it doesn't size the listview like I want. Anyone know how I can accomplish this? I'm using C# .NET 4.0 and VS2010.</p>
  
  <pre><code>&lt;Window x:Class="TaskManager.MainWindow"
          xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
          xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          Title="MainWindow" MinWidth="525" MinHeight="400"&gt;
      &lt;StackPanel Orientation="Vertical"&gt;
          &lt;Menu Name="mainMenu" Margin="0,0,0,5"&gt;
              &lt;MenuItem Header="File"&gt;
                  &lt;MenuItem Header="Quit" /&gt;
              &lt;/MenuItem&gt;
          &lt;/Menu&gt;
          &lt;StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,0,0,5"&gt;
              &lt;Label&gt;View tasks for user:&lt;/Label&gt;
              &lt;ComboBox Name="userList" MinWidth="150"&gt;&lt;/ComboBox&gt;
          &lt;/StackPanel&gt;
          &lt;ListView Name="taskView" VerticalContentAlignment="Stretch"&gt;
              &lt;ListView.View&gt;
                  &lt;GridView&gt;
                      &lt;GridViewColumn Header="Task" Width="300"/&gt;
                      &lt;GridViewColumn Header="Hours" Width="50"/&gt;
                  &lt;/GridView&gt;
              &lt;/ListView.View&gt;
          &lt;/ListView&gt;
          &lt;Grid&gt;
              &lt;Grid.ColumnDefinitions&gt;
                  &lt;ColumnDefinition Width="353*" /&gt;
                  &lt;ColumnDefinition Width="97*" /&gt;
                  &lt;ColumnDefinition Width="53" /&gt;
              &lt;/Grid.ColumnDefinitions&gt;
              &lt;Grid.RowDefinitions&gt;
                  &lt;RowDefinition/&gt;
                  &lt;RowDefinition/&gt;
              &lt;/Grid.RowDefinitions&gt;
              &lt;Label Grid.Row="0" Grid.Column="0"&gt;Task Description&lt;/Label&gt;
              &lt;TextBox Grid.Row="1" Grid.Column="0"/&gt;
              &lt;Label Grid.Row="0" Grid.Column="1"&gt;Hours&lt;/Label&gt;
              &lt;TextBox Grid.Row="1" Grid.Column="1"/&gt;
              &lt;Button Grid.Row="1" Grid.Column="2"&gt;Add&lt;/Button&gt;
          &lt;/Grid&gt;
      &lt;/StackPanel&gt;
  &lt;/Window&gt;
  </code></pre>