title: WPF scrollbar on Auto and SizeToContent="Height" goes under Windows7 toolbar
body: <p>I have peculiar problem where WPF scrollbar set to <code>Auto</code> and <code>Window</code> set to <code>SizeToContent=&quot;Height&quot;</code> sizes itself to go under the Windows 7 toolbar.</p>
  <p><img src="https://i.stack.imgur.com/qjiZZ.png" alt="enter image description here" /></p>
  <p>XAML is trivial really.</p>
  <pre><code>&lt;Window x:Class=&quot;....ProbateControllerView&quot;
          xmlns=&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;
          xmlns:x=&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;
         Title=&quot;Probate&quot; Width=&quot;1100&quot; ResizeMode=&quot;CanMinimize&quot; Background=&quot;White&quot; SizeToContent=&quot;Height&quot;&gt;
      &lt;Grid&gt;
          &lt;ScrollViewer VerticalScrollBarVisibility=&quot;Auto&quot; &gt;
              &lt;StackPanel&gt;
                  &lt;ContentControl HorizontalAlignment=&quot;Center&quot; DockPanel.Dock=&quot;Top&quot; x:Name=&quot;ActiveItem&quot;/&gt;
              &lt;/StackPanel&gt;
          &lt;/ScrollViewer&gt;
      &lt;/Grid&gt;
  &lt;/Window&gt;
  </code></pre>
  <p>I could add <code>Height</code> and set to <code>SizeToContent=&quot;Manual&quot;</code> as constant to <code>Window</code> but when on lower resolution I will run into same issue.<br />
  I am sure someone by now has ran into this problem and I must be missing something here.</p>