title: WPF Window MinWidth depending on size of toolbar
body: <p>Before asking this question I have looked at all related questions, but have not found anything relevant.</p>
  
  <p>In my application I have toolbox style bar, which is basically stack panel with bunch of buttons. User may change which buttons are shown in toolbar.</p>
  
  <p>Window width may be changed, but it can not be smaller then width of toolbar.</p>
  
  <p>At first I was hoping to bind the <code>MinWidth</code> property to the <code>StackPanel</code> <code>Width</code> property and create converter that adds few pixels to <code>Width</code> of the <code>StackPanel</code>. The problem is that my converter does not get Width of <code>StackPanel</code>, just NaN as value :(</p>
  
  <p>Unfortunately, <code>StackPanel</code> width is set to <code>Auto</code> and I can not change that.</p>
  
  <p>Is there any way I can make my Window <code>MinWidth</code> dependable on <code>Width</code> of <code>StackPanel</code>?</p>