title: How to make a WPF TextBox fill all available space between two buttons ?
body: <p>I'm trying to make a WPF TextBox fill all available space between two buttons. For some reason the code below does not what I'm trying to achieve</p>
  
  <pre><code>&lt;DockPanel  Height="48" LastChildFill="False"&gt;
      &lt;Button DockPanel.Dock="Left"&gt;
          &lt;Image Source="Images\large_load.png"&gt;&lt;/Image&gt;
      &lt;/Button&gt;
      &lt;Button DockPanel.Dock="Left"&gt;
          &lt;Image Source="Images\large_reload.png"&gt;&lt;/Image&gt;
      &lt;/Button&gt;
      &lt;TextBox Height="24" HorizontalAlignment="Stretch" DockPanel.Dock="Left"&gt;&lt;/TextBox&gt;
      &lt;Button DockPanel.Dock="Right" Width="48"&gt;
          &lt;Image Source="Images\large_delete.png"&gt;&lt;/Image&gt;
      &lt;/Button&gt;
  &lt;/DockPanel&gt;
  </code></pre>
  
  <p>The TextBox is not stretched.</p>
  
  <p>Another problem is that when text is added, the textbox width increases and eventually it pushes the right button out of the visible space.</p>