How do I get stackpanel to resize to fit the controls it's stacking?
<p>I'm making a toolbar.  I want the width of the window to equal the total width of the buttons.  StackPanel seems perfect for the job because it lines everything up, but it won't stretch.</p>

<pre><code>  &lt;Window Width="auto"&gt;
     &lt;StackPanel Orientation="Horizontal" Width="auto"&gt;
        &lt;Button /&gt;
        &lt;Button /&gt;
     &lt;/StackPanel&gt;
  &lt;/Window&gt;
</code></pre>

<p>How do I make this work?</p>