title: WPF DataGrid inside a ScrollViewer
body: <p>I have a <code>StackPanel</code> with a header control and a <code>DataGrid</code> Inside a <code>Scrollviewer</code>; like so:</p>
  
  <pre><code>&lt;ScrollViewer&gt;
      &lt;StackPanel Orientation="Vertical"&gt;
          &lt;Canvas x:Name="header" 
                  Height="300" /&gt;
          &lt;DataGrid x:Name="dataGrid"&gt;
          &lt;/DataGrid&gt;
      &lt;/StackPanel&gt;
  &lt;/ScrollViewer&gt;
  </code></pre>
  
  <p>The scoll behavior should fulfill these requirements:</p>
  
  <ul>
  <li>Scrolling while MouseOver the <code>DataGrid</code> should scroll the outer <code>ScrollViewer</code></li>
  <li><p>The header control (symbolized by <code>Canvas</code>) is scrolled by the <code>ScollViewer</code>.</p></li>
  <li><p>The horizontal scrollbar at the bottom of the <code>DataGrid</code> should be preserved on screen at any time. </p></li>
  <li><p>The horizontal scrollbar should not scroll the header control, only the <code>DataGrid</code>.</p></li>
  </ul>
  
  <p>I tried various settings for the <code>DataGrid.ScrollViewer</code> but none have the desired effect, nor does changing the <code>StackPanel</code> to a <code>WrapPanel</code> or even <code>Grid</code> help any.</p>
  
  <p>Is this possible? Any help and resources to read are appreciated.</p>