WPF Dockpanel first child uses remaining space
Make it like this: <DockPanel LastChildFill=”True”> <Button Content=”…” DockPanel.Dock=”Right”/> <!– button to browse for file –> <TextBox DockPanel.Dock=”Left” HorizontalAlignment=”Stretch”/> <!– path to file –> </DockPanel>