title: WPF TextBox and Scroll behavior
body: <p>I have a problem.
  I need to host grid with controls in ScrollViewer to prevent textbox from being either truncated or collapsed to zero-with at the UI. Also I want the with of textbox to be expanded when user change windows width.
  I'm setting Window's content to following code</p>
  
  <pre><code>&lt;DockPanel&gt;
      &lt;TreeView DockPanel.Dock="Left" Width="150"/&gt;
      &lt;ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto"&gt;
          &lt;Grid&gt;
              &lt;Grid.ColumnDefinitions&gt;
                  &lt;ColumnDefinition Width="Auto"/&gt;
                  &lt;ColumnDefinition /&gt;
              &lt;/Grid.ColumnDefinitions&gt;
              &lt;Grid.RowDefinitions&gt;
                  &lt;RowDefinition Height="Auto"/&gt;
              &lt;/Grid.RowDefinitions&gt;
              &lt;TextBlock Text="Name" 
                         Margin="5" 
                         VerticalAlignment="Center"/&gt;
              &lt;TextBox Grid.Column="1"
                       Text="Some Name"
                       Margin="5"
                       VerticalAlignment="Center"
                       MinWidth="200"/&gt;
          &lt;/Grid&gt;
      &lt;/ScrollViewer&gt;
  &lt;/DockPanel&gt;
  </code></pre>
  
  <p>All work fine, but when user types very long text in TextBox it is being expanded and horizontal scroll appears.
  Is there any easy way to limit TextBox maximum width and allow it to be expanded only when user changes window size.</p>