title: Fill Grid width inside a listbox
body: <p>I have a grid as the datatemplate for items in a listbox and it's not filling the whole width of the control. I have tried the suggestions in the other questions but they are not working: </p>
  
  <p>This is the listbox xaml </p>
  
  <pre><code> &lt;ListBox ItemsSource="{Binding AccessControl.Credentials}" &gt;                      
                                  &lt;ListBox.ItemTemplate&gt;
                              &lt;DataTemplate&gt;
                                      &lt;Grid &gt;
                                          &lt;Grid.ColumnDefinitions&gt;
                                              &lt;ColumnDefinition Width="*"/&gt;
                                              &lt;ColumnDefinition Width="*"/&gt;
                                              &lt;ColumnDefinition Width="*"/&gt;
                                              &lt;ColumnDefinition Width="*"/&gt;
                                              &lt;ColumnDefinition Width="Auto"/&gt;
                                          &lt;/Grid.ColumnDefinitions&gt;
                                          &lt;Grid.RowDefinitions&gt;
                                              &lt;RowDefinition/&gt;
                                              &lt;RowDefinition/&gt;
                                              &lt;RowDefinition/&gt;
                                          &lt;/Grid.RowDefinitions&gt;
  
                                          &lt;Label Grid.Column="0" Grid.Row="0"&gt;Name&lt;/Label&gt;
                                          &lt;Label Grid.Column="0" Grid.Row="1"&gt;Attribute&lt;/Label&gt;
                                          &lt;Label Grid.Column="2" Grid.Row="1"&gt;Value&lt;/Label&gt;   &lt;/Grid&gt;
                              &lt;/DataTemplate&gt;
                      &lt;/ListBox.ItemTemplate&gt;
                  &lt;/ListBox&gt;
  </code></pre>
  
  <p>and I am using a theme file from the following project: <a href="http://wpfthemes.codeplex.com/">http://wpfthemes.codeplex.com/</a> here is the relevant part: </p>
  
  <pre><code> &lt;Style TargetType="{x:Type ListBox}"&gt;
      &lt;Setter Property="SnapsToDevicePixels" Value="true" /&gt;
      &lt;Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" /&gt;
      &lt;Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" /&gt;
      &lt;Setter Property="ScrollViewer.CanContentScroll" Value="True" /&gt;
      &lt;Setter Property="HorizontalContentAlignment" Value="Stretch" /&gt;
      &lt;Setter Property="VerticalContentAlignment" Value="Center" /&gt;
      &lt;Setter Property="FontFamily" Value="Trebuchet MS" /&gt;
      &lt;Setter Property="FontSize" Value="12" /&gt;
      &lt;Setter Property="BorderBrush" Value="{DynamicResource ControlBorderBrush}" /&gt;
      &lt;Setter Property="BorderThickness" Value="1" /&gt;
      &lt;Setter Property="Padding" Value="1" /&gt;
      &lt;Setter Property="IsTabStop" Value="False" /&gt;
      &lt;Setter Property="Template"&gt;
          &lt;Setter.Value&gt;
              &lt;ControlTemplate TargetType="{x:Type ListBox}"&gt;
                  &lt;Grid&gt;
                      &lt;Border x:Name="Border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="1" Background="{DynamicResource ControlBackgroundBrush}"&gt;
                          &lt;ScrollViewer Margin="1" Focusable="false" Foreground="{TemplateBinding Foreground}"&gt;
  
                              &lt;StackPanel Margin="2" IsItemsHost="true" /&gt;
  
                          &lt;/ScrollViewer&gt;
                      &lt;/Border&gt;
                      &lt;Border x:Name="DisabledVisualElement" IsHitTestVisible="false" Background="#A5FFFFFF" BorderBrush="#66FFFFFF" BorderThickness="1" Opacity="0" /&gt;
                  &lt;/Grid&gt;
                  &lt;ControlTemplate.Triggers&gt;
                      &lt;Trigger Property="IsEnabled" Value="false"&gt;
                          &lt;Setter Property="Opacity" TargetName="DisabledVisualElement" Value="1" /&gt;
                      &lt;/Trigger&gt;
                      &lt;Trigger Property="IsGrouping" Value="true"&gt;
                          &lt;Setter Property="ScrollViewer.CanContentScroll" Value="false" /&gt;
                      &lt;/Trigger&gt;
                  &lt;/ControlTemplate.Triggers&gt;
              &lt;/ControlTemplate&gt;
          &lt;/Setter.Value&gt;
      &lt;/Setter&gt;
  &lt;/Style&gt;
  </code></pre>
  
  <p>Did I miss something? </p>