<p>This seems like it should be easy but I'm stumped. In WPF, I'd like a TextBox that stretches to the width of it's parent, but only to a maximum width. The problem is that I want it to be left justified within its parent. To get it to stretch you have to use HorizontalAlignment="Stretch", but then the result is centered. I've experimented with HorizontalContentAlignment, but it doesn't seem to do anything.</p>

<p>How do I get this blue text box to grow with the size of the window, have a maximum width of 200 pixels, and be left justified?</p>

<pre><code>&lt;Page
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"&gt;
  &lt;StackPanel&gt;  
    &lt;TextBox Background="Azure" Text="Hello" HorizontalAlignment="Stretch" MaxWidth="200" /&gt;
  &lt;/StackPanel&gt;
&lt;/Page&gt;
</code></pre>

<p>What's the trick?</p>

```
```
<Grid>
    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="*" MaxWidth="200"/>
    </Grid.ColumnDefinitions>

    <TextBox Background="Azure" Text="Hello" />
</Grid>
```
```