title: ListBoxItem HorizontalContentAlignment To Stretch Across Full Width of ListBox
body: <p>I have a problem with my <code>ListBoxItem</code>'s on a Windows Phone 8 app, while trying to get them to stretch across all the width of the <code>ListBox</code>.</p>
  
  <p>My <code>ListBox</code>:</p>
  
  <pre><code>&lt;ListBox 
        ItemsSource="{Binding Events}" 
        behaviors:ItemClickCommandBehavior.Command="{Binding EventSelectedCommand}"
        ItemTemplate="{StaticResource EventListTemplateSelector}"/&gt;
  </code></pre>
  
  <p>And its DataTemplates are in a seperate xaml resource file:</p>
  
  <pre><code>&lt;DataTemplate x:Key="EventListHeaderTemplate"&gt;
      &lt;Border HorizontalAlignment="Stretch"&gt;
          &lt;Grid Height="50"&gt;
              &lt;Grid.ColumnDefinitions&gt;
                  &lt;ColumnDefinition Width="*"/&gt;
                  &lt;ColumnDefinition Width="6*"/&gt;
              &lt;/Grid.ColumnDefinitions&gt;
              &lt;Image Grid.Column="0" Source="{Binding ImageUri}" VerticalAlignment="Center" HorizontalAlignment="Center" Height="30"/&gt;
              &lt;TextBlock Grid.Column="1" Text="{Binding SomeText}" VerticalAlignment="Center" HorizontalAlignment="Left" Foreground="Black"/&gt;
          &lt;/Grid&gt;
      &lt;/Border&gt;
  &lt;/DataTemplate&gt;
  </code></pre>
  
  <p>I cant get the items to really Stretch, and I dont know where the problem is. I have tried to set the <code>ItemContainerStyle</code> HorizontalCOntentAlignment="Stretch" and it didn't work. I have tried many other combinations and it seems that only setting the Border or Grid width to a constant works and one other solution that works is to set the Border width to bind to the ActualWidth of the containing ListBox, but I want to use the Stretch variant if could make it work.</p>