title: Easiest way to click a Checkbox in a DataGrid for C#/WPF
body: <pre><code>    &lt;DataGrid x:Name="dataGridShortcuts" AutoGenerateColumns="False" AlternationCount="2" AlternatingRowBackground="#FFADB5B9" Margin="0,0,0,47"&gt;
          &lt;DataGrid.Columns&gt;
              &lt;DataGridTextColumn IsReadOnly="True" Binding="{Binding}" Header="Name"/&gt;
              &lt;DataGridCheckBoxColumn Binding="{x:Null}" ClipboardContentBinding="{x:Null}" /&gt;
          &lt;/DataGrid.Columns&gt;
      &lt;/DataGrid&gt;
  </code></pre>
  
  <p>when I click the row (any cell), how can I enable/disable the checkbox in the 2nd column?</p>
  
  <p>Currently I have to double click and I read several articles that discuss the first click puts it into editing mode and the second click checks it.</p>
  
  <p>I've also tried</p>
  
  <pre><code>        Style rowStyle = new Style(typeof(DataGridRow));
          rowStyle.Setters.Add(new EventSetter(DataGridRow.MouseDoubleClickEvent,
                                   new MouseButtonEventHandler(Row_DoubleClick)));
          dataGridShortcuts.RowStyle = rowStyle;
  </code></pre>
  
  <p>and this didn't work either.</p>