title: How to find either header or row is double clicked on datagrid wpf
body: <p>I added a datagrid in a wpf application. </p>
  
  <pre><code>&lt;DataGrid ItemsSource="{Binding Projects}" SelectedItem="{Binding SelectedProject}" MouseDoubleClick="DataGrid_MouseDoubleClick" /&gt;
  </code></pre>
  
  <p>and here is my code behind</p>
  
  <pre><code>private void DataGrid_MouseDoubleClick(object sender, System.Windows.Input.MouseButtonEventArgs e)
  {
      if selected row is header
          then do this
      else
          do this
  }
  </code></pre>
  
  <p>Now question is how I came to know which one is double clicked. It is header or a row. How I can find it out.</p>