I have a DockPanel, containing a Label with a fixed width and a TextBox with a Min and MaxWidth. I want to align the TextBox to the left and have it stretch until its MaxWidth and have it shrink until its MinWidth (if the Window is resized for example) Like this:
Panel:
<DockPanel LastChildFill="True">
<Label Content="Fixed Width" DockPanel.Dock="Left" />
<TextBox MinWidth="80" MaxWidth="250" DockPanel.Dock="Left" HorizontalAlignment="Left" />
</DockPanel>
However this only aligns the TextBox on the left. If I leave out the HorizontalAlignment it centers. How can I achieve something like in the screenshot?
Please note that I don't want to use a Grid, since I need to wrap the TextBox at some point below the Label (I'll do this with a Trigger changing the Dock property currently).