title: WPF: SizeToContent="WidthAndHeight" + WindowState="Minimized" Bug
body: <p>When I set the default properties of the window as:</p>
  
  <p><code>SizeToContent="WidthAndHeight"</code> and <code>WindowState="Minimized"</code>,</p>
  
  <p>The window will have a <strong>black</strong> part on the right side.</p>
  
  <p>To reproduce it try making a new WPF project and set the properties as stated above then add this:</p>
  
  <pre><code>&lt;StackPanel&gt;
      &lt;Button&gt;HELLO&lt;/Button&gt;
      &lt;Button&gt;HELLO&lt;/Button&gt;
  &lt;/StackPanel&gt;
  </code></pre>
  
  <p>When you run it, it will look like this... </p>
  
  <p><a href="https://i.stack.imgur.com/xSv17.png" rel="noreferrer"><img src="https://i.stack.imgur.com/xSv17.png" alt="enter image description here"></a></p>
  
  <p>But in design mode, it looks fine.. </p>
  
  <p><a href="https://i.stack.imgur.com/yxYwe.png" rel="noreferrer"><img src="https://i.stack.imgur.com/yxYwe.png" alt="enter image description here"></a></p>
  
  <p>If you try to resize the window, the buttons will snap into places and fix the layout. Or if you remove the either of the two properties, the black part will be gone.</p>
  
  <p>Is there any work around for this? Is this a known bug?</p>