title: How to automatically size TabControl in a DockPanel - WPF
body: <p>I have a simple WPF Forms app.  I have a DockPanel as my root panel.  The first child is a StackPanel that has some controls in it, then the second control is a TabControl.  What I want, and the panel types can change all they want is for the TabControl to maintain the fill size of the window except for what the first StackPanel consumes.  However no matter what I try the TabControl seems to change its size depending on whats inside it, not whats it is inside of.</p>
  
  <pre><code>&lt;Window&gt;
      &lt;DockPanel&gt;
          &lt;StackPanel&gt; &lt;/StackPanel&gt;
          &lt;TabControl&gt; &lt;/TabControl&gt;
      &lt;/DockPanel&gt;
  &lt;/Window&gt;
  </code></pre>