title: Xamarin.Forms: ListView inside StackLayout: How to set height?
body: <p>In a <code>ContentPage</code> I have a <code>ListView</code> inside a <code>StackLayout</code> inside a <code>ScrollView</code>. The <code>ListView</code> is populated (<code>ItemSource</code> is set) in the <code>ContentPage</code> when <code>OnAppearing</code> gets called and I can see that the list is populated in the emulator. The <code>StackLayout</code>s orientation is <code>Vertical</code> and below the <code>ListView</code> I have a <code>Button</code>.</p>
  
  <p>My problem is that no matter how many elements the <code>ListView</code> has, it gets the height of 53.33. I would like the height of the <code>ListView</code> to match the total height of the items in it. By setting <code>HeightRequest</code> I can set the height of the <code>ListView</code> to anything I want, but since I do not know the height of the items inside the <code>ListView</code> the result is most often that the distance to the button below it is incorrect and therefore looks ugly. I have tried to set <code>VerticalOptions</code> on both the <code>ListView</code> and the <code>StackLayout</code> to <code>Start</code>and other settings, but this does not change the height from 53.33 (and if I try to combine using <code>HeightRequest</code> and <code>Start</code> it turns out that HeightRequest wins out).</p>
  
  <p>How can I solve this?</p>
  
  <p>(please excuse the cross posting from <a href="http://forums.xamarin.com/discussion/19874/listview-inside-stacklayout-a-height-problem" rel="noreferrer">Xamarin forum</a>)</p>