title: ScrollViewer only scrollable when contents minHeight falls below
body: <p>Lets take this code as basis:</p>
  
  <pre><code>&lt;ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"&gt;
      &lt;Grid&gt;
          &lt;Grid.RowDefinitions&gt;
              &lt;RowDefinition Height="50" /&gt;
              &lt;RowDefinition Height="50" /&gt;
              &lt;RowDefinition Height="*" /&gt;
          &lt;/Grid.RowDefinitions&gt;
  
          &lt;Button
              x:Name="_buttonAdd"
              Grid.Row="0"
              Click="_buttonAdd_Click"
              Content="Daten hinzufügen" /&gt;
  
          &lt;Button
              x:Name="_buttonDel"
              Grid.Row="1"
              Click="_buttonDel_Click"
              Content="Daten löschen" /&gt;
  
          &lt;DataGrid
              x:Name="_dataGrid"
              Grid.Row="2"
              MinHeight="200"
              HorizontalAlignment="Stretch"
              VerticalAlignment="Stretch"
              AutoGenerateColumns="True"
              ItemsSource="{Binding Path=MitarbeiterList}"
              VerticalScrollBarVisibility="Auto"&gt;
          &lt;/DataGrid&gt;
      &lt;/Grid&gt;
  &lt;/ScrollViewer&gt;
  </code></pre>
  
  <p>I want the ScrollViewer only to scroll, if the MinHeight of the DataGrid falls below 200.
  On the other side I want the ScrollViewer not to scroll, if the MinHeight exceeds or in
  other words: I want the DataGrid to stretch vertically to the visible area and shows its
  own Scrollbar if necessary.</p>
  
  <p>I hope you guys can solve my problem. </p>
  
  <p>thanks in advance.</p>