title: WPF ScrollViewer around DataGrid affects column width
body: <p>I have a problem with a ScrollViewer that I use to scroll a user control that contains a data grid. Without the scroll viewer the columns fill the data grid as I want but when adding a scroll viewer the columns shrink to ~15px. I was able to simplify my layout and can still reproduce this behaviour. </p>
  
  <p>When binding the datagrid width to another control the columns have their normal with, but that has unsuprisingly the same effect as a fixed width on the datagrid.
  I guess I'm not the first one who has this problem. How can I work around this behaviour to have my grid adjusting its size to the available space and give it's columns a propotional width?</p>
  
  <p>With scrollviewer:
  <img src="https://i.stack.imgur.com/PXtKn.png" alt="enter image description here">
  and without:
  <img src="https://i.stack.imgur.com/PaJhr.png" alt="enter image description here"></p>
  
  <pre><code>&lt;Window x:Class="GridTest.MainWindow"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      Title="MainWindow" Height="350" Width="525"&gt;
  &lt;ScrollViewer HorizontalScrollBarVisibility="Auto"&gt;
  &lt;Grid MinWidth="200"&gt;
      &lt;DataGrid Margin="0" AutoGenerateColumns="False"&gt;
          &lt;DataGrid.Columns&gt;
              &lt;DataGridCheckBoxColumn Header="Column A" Width="*"/&gt;
              &lt;DataGridCheckBoxColumn Header="Column B" Width="*"/&gt;
          &lt;/DataGrid.Columns&gt;
      &lt;/DataGrid&gt;
  &lt;/Grid&gt;
  &lt;/ScrollViewer&gt;
  </code></pre>
  
  <p></p>