title: How to get a ListBox ItemTemplate to stretch horizontally the full width of the ListBox?
body: <p>I want to have the ListItems to extend with their orange background the full width of the Listbox.</p>
  
  <p>Currently they are only as wide as the FirstName + LastName.</p>
  
  <p>I've set every element I can to: HorizontalAlignment="Stretch".</p>
  
  <p>I want the background of the ListboxItems to expand as the user stretches the Listbox so I don't want to put in absolute values. </p>
  
  <p><strong>What do I have to do so that the background color of the ListBoxItems fill the width of the ListBox?</strong></p>
  
  <pre><code>&lt;Window x:Class="TestListBoxSelectedItemStyle.Window1"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:local="clr-namespace:TestListBoxSelectedItemStyle"
      Title="Window1" Height="300" Width="300"&gt;
  
      &lt;Window.Resources&gt;
          &lt;local:CustomerViewModel x:Key="TheDataProvider"/&gt;
  
          &lt;DataTemplate x:Key="CustomerItemTemplate"&gt;
              &lt;Border CornerRadius="5" Background="Orange" HorizontalAlignment="Stretch" Padding="5" Margin="3"&gt;
                  &lt;StackPanel Orientation="Horizontal" HorizontalAlignment="Stretch" Width="Auto"&gt;
                      &lt;TextBlock HorizontalAlignment="Stretch"&gt;
                      &lt;TextBlock.Text&gt;
                          &lt;MultiBinding StringFormat="{}{0} {1}"&gt;
                              &lt;Binding Path="FirstName"/&gt;
                              &lt;Binding Path="LastName"/&gt;
                          &lt;/MultiBinding&gt;
                      &lt;/TextBlock.Text&gt;
                      &lt;/TextBlock&gt;
                  &lt;/StackPanel&gt;
              &lt;/Border&gt;
          &lt;/DataTemplate&gt;
  
      &lt;/Window.Resources&gt;
  
      &lt;Grid&gt;
          &lt;ListBox ItemsSource="{Binding Path=GetAllCustomers, Source={StaticResource TheDataProvider}}"
                   ItemTemplate="{StaticResource CustomerItemTemplate}"/&gt;
      &lt;/Grid&gt;
  &lt;/Window&gt;
  </code></pre>