title: Silverlight 3: ListBox DataTemplate HorizontalAlignment
body: <p>I have a ListBox with it's ItemTemplate bound to a DataTemplate. My problem is I cannot get the elements in the template to stretch to the full width of the ListBox.</p>
  
  <pre><code>&lt;ListBox x:Name="listPeople" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" 
      Margin="0,0,0,0" Background="{x:Null}" SelectionMode="Extended" Grid.Row="1" 
      ItemTemplate="{StaticResource PersonViewModel.BrowserDataTemplate}" 
      ItemsSource="{Binding Mode=OneWay, Path=SearchResults}" &gt;
  &lt;/ListBox&gt;
  
  &lt;DataTemplate x:Key="PersonViewModel.BrowserDataTemplate"&gt;
     &lt;ListBoxItem HorizontalAlignment="Stretch" VerticalAlignment="Stretch"&gt;
       &lt;Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="5,5,5,5"&gt;
         &lt;Border Opacity=".1" x:Name="itemBorder"  Background="#FF000000"   
           HorizontalAlignment="Stretch" VerticalAlignment="Stretch" 
           CornerRadius="5,5,5,5" MinWidth="100" Height="50"/&gt;
        &lt;/Grid&gt;
     &lt;/ListBoxItem&gt;
  &lt;/DataTemplate&gt;
  </code></pre>
  
  <p>As you can see, I have added a border within the grid to indicate the width of the template. My goal is to see this border expand to the full width of the listbox. Currently its width is determined by its contents or MinWidth, which is the only thing at the moment keeping it visible at all.</p>