title: WPF Auto height in code
body: <p>How could I set the value of the <code>Height</code> property of a WPF control in C# code to "<code>Auto</code>"?</p>
  
  <pre><code>&lt;Grid.RowDefinitions&gt;
      &lt;RowDefinition /&gt;
      &lt;RowDefinition Height="Auto" /&gt;
      &lt;RowDefinition /&gt;
      &lt;RowDefinition Height="Auto" /&gt;
      &lt;RowDefinition /&gt;
      &lt;RowDefinition Height="Auto" /&gt;
      &lt;RowDefinition /&gt;
      &lt;RowDefinition Height="Auto" /&gt;
      &lt;RowDefinition /&gt;
  &lt;/Grid.RowDefinitions&gt;
  </code></pre>
  
  <p>I want to reproduce this behavior in the code behind. Any ideas?</p>