title: WPF Frame - Size to content
body: <p>I've been having difficulty getting the WPF Frame control to resize to it's contents height (HTML).</p>
  
  <p>(edit) the HTML content is 500px, I was expecting the first row to take this height, but the Frame is being clipped to 150px.</p>
  
  <p>I've tried quite a few alterations on this theme:</p>
  
  <pre><code>&lt;Grid&gt;
      &lt;Grid.RowDefinitions&gt;
          &lt;RowDefinition Height="Auto" /&gt;
          &lt;RowDefinition /&gt;
      &lt;/Grid.RowDefinitions&gt;
      &lt;Grid.ColumnDefinitions&gt;
          &lt;ColumnDefinition /&gt;
          &lt;ColumnDefinition /&gt;
      &lt;/Grid.ColumnDefinitions&gt;
  
      &lt;Frame Grid.ColumnSpan="2"
              VerticalAlignment="Bottom"
              HorizontalContentAlignment="Stretch" VerticalContentAlignment="Top"
              NavigationUIVisibility="Hidden"
              Source="..\My Web Sites\test.html" /&gt;
  
      &lt;Button Grid.Row="1"
              Width="160" Height="50"                 
              HorizontalAlignment="Center" VerticalAlignment="Center"
              Content="Book Todays Events" /&gt;
  
      &lt;DockPanel Grid.Row="1" Grid.Column="1"
                  HorizontalAlignment="Center"&gt;
          &lt;Button Width="160" Height="50"
                  DockPanel.Dock="Bottom"
                  HorizontalAlignment="Right"
                  Content="Select Date" /&gt;
          &lt;Border Width="350"
                  HorizontalAlignment="Center"
                  Background="Gray"&gt;
              &lt;TextBlock Text="Calendar" /&gt;
          &lt;/Border&gt;
      &lt;/DockPanel&gt;
  &lt;/Grid&gt;
  </code></pre>
  
  <p>I've tried swapping out the Frame for a ContentControl with 500px of content which worked fine, so I'm not sure what the problem is...</p>
  
  <p>The HTML is a static height, and won't change at runtime, however the client will be able to alter it so I don't wan't to define a static height or hack into the HTML to find a height.</p>