title: WPF DataGrid: how do I stop auto scrolling when a cell is clicked?
body: <p><strong>Problem:</strong><br>
  If my <code>DataGrid</code> is not entirely visible (horizontal &amp; vertical scrollbars are showing) and I click on one of my cells that is partially visible, the grid auto-scrolls to bring that cell into view. <em>I don't want this to happen</em>. I've tried playing around with <code>RequestBringIntoView</code>, like this:</p>
  
  <pre><code>private void DataGrid_RequestBringIntoView(object sender, RequestBringIntoViewEventArgs e)
  {
      e.Handled = true;
  }
  </code></pre>
  
  <p>But that does nothing.</p>
  
  <p><strong>Things I've tried:</strong>  </p>
  
  <ul>
  <li>My cells are custom <code>UserControls</code>; I tried putting an event handler for <code>RequestBringIntoView</code> on all <code>UserControls</code> that make up my cells, and tried handling the event, thinking that maybe I wasn't doing enough by just handling <code>RequestBringIntoView</code> on the <code>DataGrid</code> itself. This did not work.</li>
  <li>Hosted the <code>DataGrid</code> inside of a <code>ScrollViewer</code>, and handled the <code>ScrollViewer</code>'s <code>RequestBringIntoView</code> event. This actually works, and stops the auto-scrolling behavior, but in my case hosting a <code>DataGrid</code> inside of a <code>ScrollViewer</code> is not at all desirable, so I need to come up with a different solution.</li>
  </ul>
  
  <p>I'm not sure how to stop this behavior, any ideas?</p>