title: Set Grid Columns Width=Auto and MaxWidth
body: <p>is it possible to set a <code>Gridcolumn</code> that the behavior is like this. The <code>Width</code> is Auto but the Max is 140. In this Column there are many Labels and depending on the Userlanguage the Content changes. So I want to set a maximum Width. Like this it doesn't work:</p>
  
  <pre><code>&lt;Grid.ColumnDefinitions&gt;
                  &lt;ColumnDefinition Width="Auto" MaxWidth="140"/&gt;
                  &lt;ColumnDefinition Width="*"/&gt;
                  &lt;ColumnDefinition Width="Auto"/&gt;
              &lt;/Grid.ColumnDefinitions&gt;
  </code></pre>
  
  <p>I have a <code>Grid</code> with three <code>Columns</code>, the first and third are for <code>Labels</code>. The second is for <code>ComboBox</code>/<code>TextBox</code>. The First and second should be <code>Auto</code> so they fit the <code>Content</code> of the <code>Labels</code> and the second should fill up the remaining space.</p>
  
  <p><strong>UPDATE Complte Code:</strong></p>
  
  <pre><code>&lt;UserControl d:DesignHeight="600" d:DesignWidth="800" KeyboardNavigation.TabNavigation="Local" HorizontalAlignment="Left" VerticalAlignment="Top"&gt;
  &lt;Grid&gt;
      &lt;Grid.ColumnDefinitions&gt;
          &lt;ColumnDefinition Width="Auto" /&gt;
          &lt;ColumnDefinition Width="Auto" /&gt;
      &lt;/Grid.ColumnDefinitions&gt;
  &lt;!--&lt;/Grid&gt;--&gt;
  &lt;GroupBox Header="Einkauf" Height="310" Margin="0,0,5,0" Name="grpLieferadresse" Grid.Column="0" Width="350" KeyboardNavigation.TabNavigation="Local"&gt;            
          &lt;Grid&gt;
          &lt;Grid.RowDefinitions&gt;                    
              &lt;RowDefinition /&gt;
          &lt;/Grid.RowDefinitions&gt;
          &lt;Grid.ColumnDefinitions&gt;
              &lt;ColumnDefinition Width="Auto" MaxWidth="140"/&gt;
              &lt;ColumnDefinition Width="*"/&gt;
              &lt;ColumnDefinition Width="Auto"/&gt;
          &lt;/Grid.ColumnDefinitions&gt;
          &lt;Label Grid.Column="0" Grid.Row="0" Content="Beschaffungsdauer" Name="label5" /&gt;
          &lt;TextBox Grid.Column="1" Grid.Row="0" IsEnabled="False" Name="txtBeschaffungsdauer" Text="{Binding Path=LName1}" Margin="0,0,0,5" TabIndex="5" /&gt;
          &lt;Label Grid.Column="2" Grid.Row="0" Content="Tage" Name="label10" /&gt;
          &lt;/Grid&gt;            
      &lt;/GroupBox&gt;
  &lt;GroupBox Header="Bankverbindung" Name="groupBox1" Grid.Column="1" KeyboardNavigation.TabNavigation="Local" Height="310"&gt;
      &lt;Grid&gt;
          &lt;Grid.RowDefinitions&gt;
              &lt;RowDefinition Height="29"/&gt;
              &lt;RowDefinition Height="*"/&gt;
          &lt;/Grid.RowDefinitions&gt;
          &lt;my:uscBankverbindung Grid.Row="1" x:Name="uscBankverbindung1" TabIndex="10" VerticalAlignment="Top"/&gt;       
      &lt;/Grid&gt;
  &lt;/GroupBox&gt;
  </code></pre>
  
  <p>
  </p>
  
  <p>What it looks like:</p>
  
  <p>As you can see the <code>TextBox</code> is very small.</p>
  
  <p><img src="https://i.stack.imgur.com/i14LE.png" alt="Column Width Problem"></p>