title: Set CopyingRowClipboardContent event dynamically for all DataGrids
body: <p>I want to be able to copy a cell instead of a row when I hit Ctrl + C in a DataGrid, and I found that I can do this using the event CopyingRowClipboardContent and the handler :</p>
  
  <pre><code>Private Sub DataGrid_CopyingRowClipboardContent(ByVal sender As Object, ByVal e As DataGridRowClipboardEventArgs)
      Dim currentCell = e.ClipboardRowContent(dataGrid.CurrentCell.Column.DisplayIndex)
      e.ClipboardRowContent.Clear()
      e.ClipboardRowContent.Add(currentCell)
  End Sub
  </code></pre>
  
  <p>I would like to assign this behavior globally to any DataGrid created during runtime (instead of going back to my code and adding the handler to all the DataGrid one by one). </p>
  
  <p>I tried adding the following line into my <code>&lt;Window.Resources&gt;</code> code :</p>
  
  <pre><code>&lt;Style x:Key="DataGridCustomStyle" TargetType="{x:Type DataGrid}"&gt;
      &lt;EventSetter Event="CopyingRowClipboardContent" Handler="Datagrid_CopyingRowClipboardContent" /&gt;
  &lt;/Style&gt;
  </code></pre>
  
  <p>But I get an error saying that CopyingRowClipboardContent must be a RoutedEvent event.</p>