title: Prevent a TextBox from horizontal expanding in WPF
body: <p>I have the following style defined in my App.xaml</p>
  
  <pre><code>&lt;Style x:Key="textBoxMultiline" TargetType="{x:Type TextBox}" &gt;
      &lt;Setter Property="VerticalScrollBarVisibility" Value="Auto" /&gt;
      &lt;Setter Property="HorizontalScrollBarVisibility" Value="Hidden" /&gt;
      &lt;Setter Property="MinHeight" Value="50" /&gt;
      &lt;Setter Property="TextWrapping" Value="Wrap" /&gt;
  &lt;/Style&gt;
  </code></pre>
  
  <p>And throughout the solution we're using it on every text box that needs a brief text.</p>
  
  <pre><code>&lt;TextBox x:Name="textBoxDescription" Grid.Row="2" Grid.Column="1" Style="{DynamicResource textBoxMultiline}" /&gt;
  </code></pre>
  
  <p>Everything works great, but then the client complains about some fields were corped on older monitors with lower resolutions, so I placed a <code>ScrollViewer</code> on one of the higher visual tree nodes to prevent the corping.</p>
  
  <pre><code>&lt;ScrollViewer Height="Auto" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto"&gt;
     ...
  &lt;/ScrollViewer&gt;
  </code></pre>
  
  <p>Strangely, the <code>TextBox</code>es with the above style start expanding to the right instead of wrapping the text.</p>
  
  <p>Is there a way to prevent this without removing the <code>ScrollViewer</code>?   </p>