<UserControl x:Class="Chapter20.FileInputBox"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    x:Name="root">
  <DockPanel>
    <Button x:Name="theButton" DockPanel.Dock="Right" Click="theButton_Click">Przeglądaj...</Button>
    <TextBox x:Name="theTextBox" MinWidth="{Binding ActualWidth, ElementName=theButton}" Text="{Binding FileName, ElementName=root}" Margin="0,0,2,0"/>
  </DockPanel>
</UserControl>