title: Method for Allowing Scrolling of RowDetail content in WPF DataGrid
body: <p>I have a datagrid that displays items with two columns of text row data and a larger free text detail that I'm displaying via a rowdetails template with just a border and a textblock.</p>
  
  <p>The problem I have is that the text details are often larger than the area allowed for the grid. The default scroll behaviour of the datagrid means that the users can't view the whole detail as the scroll jumps to the next item. If I resolve this by using </p>
  
  <pre><code>ScrollViewer.CanContentScroll="False"
  </code></pre>
  
  <p>then the datagrid becomes unusably slow with significant numbers of rows as the virtualization is turned off.</p>
  
  <p>I did think that I could get around this by wrapping the rowdetail in a scrollviewer, but that doesn't work as the detail area isn't constrained to the render area. </p>
  
  <p>So, can anyone offer some usable options? My WPF knowledge is pretty minimal, so apologies if there's some obvious way of solving this.</p>
  
  <p>Edit: RowDetailsTemplate</p>
  
  <pre><code>&lt;DataGrid.RowDetailsTemplate&gt;
      &lt;DataTemplate &gt;
          &lt;Border Background="Gray"
                  Padding="5,5,5,5" CornerRadius="5"&gt;
              &lt;TextBlock Background="Transparent" 
                         Foreground="White" 
                         TextWrapping="Wrap"
                         Text="{Binding Text}"/&gt;
          &lt;/Border&gt;
      &lt;/DataTemplate&gt;
  &lt;/DataGrid.RowDetailsTemplate&gt;
  </code></pre>