title: Where are the margins/padding set on a wpf ListView GridView?
body: <p>I've got a WPF ListView/GridView spec'd in XAML.  The first column uses a CellTemplate to specify icons and the others use DisplayMemberBinding to populate themselves.  The icons column is 20 wide, the icons 16 but they're getting truncated by margins/padding/something.  I can't work out where it's set.</p>
  
  <p>Here's the essentials (I've removed some columns because they're the same):</p>
  
  <p></p>
  
  <pre><code>&lt;ListView.ItemContainerStyle&gt;
      &lt;Style TargetType="{x:Type ListViewItem}"&gt;
          &lt;Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" /&gt;
          &lt;Setter Property="FontWeight" Value="Normal" /&gt;
          &lt;Style.Triggers&gt;
              &lt;Trigger Property="IsSelected" Value="True"&gt;
                  &lt;Setter Property="FontWeight" Value="Bold" /&gt;
              &lt;/Trigger&gt;
          &lt;/Style.Triggers&gt;
      &lt;/Style&gt;
  &lt;/ListView.ItemContainerStyle&gt;
  
  &lt;ListView.Resources&gt;
      &lt;DataTemplate x:Key="image"&gt;
          &lt;Image Width="16" Height="16" Margin="0,0,0,0"
                            HorizontalAlignment="Center"
                            Source="{Binding Path=ObjectType, 
                                             Converter={StaticResource imageConverter} }" /&gt;
      &lt;/DataTemplate&gt;
  &lt;/ListView.Resources&gt;
  
  &lt;ListView.View&gt;
      &lt;GridView&gt;
          &lt;GridViewColumn Width="20"
                          CellTemplate="{StaticResource image}"/&gt;
          &lt;GridViewColumn Width="120" Header="Name"
                          DisplayMemberBinding="{Binding Path=Name}"/&gt;
      &lt;/GridView&gt;
  &lt;/ListView.View&gt;
  </code></pre>
  
  <p></p>
  
  <p>ImageConverter just turns an ObjectType into an image so each type of item gets its own icon.</p>