title: DataGrid row selection not working when padding is added to cells
body: <p>DataGrid control in WPF is behaving weird. When I click on a row it should be selected. 
  There is a problem when I click on cell border or row border. It simply does nothing. As a user I want to click row and select it without forcing me to re-click cause I accidentally clicked on border between cells.</p>
  
  <p>Is it possible to somehow fix this behavior so no matter where I click it selects row?</p>
  
  <hr>
  
  <p>[edit]</p>
  
  <p>I discovered its a matter of this style I applied to DataGrid to CellStyle property:</p>
  
  <pre><code>&lt;Style x:Key="CustomDataGridCellStyle" TargetType="DataGridCell"&gt;
      &lt;Setter Property="Padding" Value="2" /&gt;
      &lt;Setter Property="Margin" Value="0" /&gt;
      &lt;Setter Property="Background" Value="White" /&gt;
      &lt;Setter Property="Template"&gt;
          &lt;Setter.Value&gt;
              &lt;ControlTemplate TargetType="DataGridCell"&gt;
                  &lt;Border x:Name="border" 
                                BorderBrush="#CCaaccda"
                                BorderThickness="1"
                                CornerRadius="0"
                                Padding="4"
                              &gt;
                      &lt;ContentPresenter /&gt;
                  &lt;/Border&gt;
                  &lt;ControlTemplate.Triggers&gt;
                      &lt;DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsSelected}" Value="true"&gt;
                          &lt;Setter TargetName="border" Property="Background" Value="#CC119EDA"/&gt;
                      &lt;/DataTrigger&gt;
                  &lt;/ControlTemplate.Triggers&gt;
              &lt;/ControlTemplate&gt;
          &lt;/Setter.Value&gt;
      &lt;/Setter&gt;   
  &lt;/Style&gt;
  </code></pre>
  
  <p>If I remove it its working. I wander how style can mess with interactions to control.</p>
  
  <hr>
  
  <p>[edit]</p>
  
  <pre><code>Padding="4"
  </code></pre>
  
  <p>is preventing the created empty area between cells to not be able to take hit test. Any idea how to add not hittest blocking padding to cells?</p>
  
  <hr>
  
  <p>[edit]</p>
  
  <p>And the solution is very weird. </p>
  
  <pre><code>&lt;Grid Background="Transparent" IsHitTestVisible="True"&gt;
      &lt;ContentPresenter Margin="4"/&gt;
  &lt;/Grid&gt;
  </code></pre>
  
  <p>Margin is added to cell content and its not reacting to click. But I surrounded it with Grid that have IsHitTestVisible="True" and is transparent. WPF is crazy weird.</p>