title: How to make DockPanel fill available space
body: <p>I'm trying the content of a shopping cart in an <code>ItemsControl(ListBox)</code>.  To do so, I've created the following <code>DataTemplate</code>:</p>
  
  <pre><code>&lt;DataTemplate x:Key="Templates.ShoppingCartProduct"
                DataType="{x:Type viewModel:ProductViewModel}"&gt;
      &lt;DockPanel HorizontalAlignment="Stretch"&gt;
          &lt;TextBlock DockPanel.Dock="Left"
                     Text="{Binding Path=Name}"
                     FontSize="10"
                     Foreground="Black" /&gt;
          &lt;TextBlock DockPanel.Dock="Right"
                     Text="{Binding Path=Price, StringFormat=\{0:C\}}"
                     FontSize="10"
                     Foreground="Black" /&gt;
      &lt;/DockPanel&gt;
  &lt;/DataTemplate&gt;
  </code></pre>
  
  <p>When the items are displayed in my shopping cart however, the Name and Price <code>TextBlocks</code> are sitting right beside one another, and there is an extremely large amount of whitespace on the right hand side.</p>
  
  <p>Was wondering what the best method to force the <code>DockPanel</code> to stretch to fill all the space made available by the <code>ListItem</code> was?</p>