title: Xamarin Forms: Help needed with layout on a ListView inside a StackLayout
body: <p>I'm trying to create a view that has several controls centered inside a StackLayout.  When I have just one like this:</p>
  
  <pre><code>&lt;StackLayout Orientation="Vertical" HorizontalOptions="Center" &gt;
      &lt;controls:BindablePicker /&gt;
  &lt;/StackLayout&gt;
  </code></pre>
  
  <p>It works fine:
  <a href="https://i.stack.imgur.com/ztysG.png" rel="nofollow noreferrer">Centered</a></p>
  
  <p>However, when I try to add a ListView, e.g.:</p>
  
  <pre><code>&lt;StackLayout Orientation="Vertical" HorizontalOptions="Center" &gt;
    &lt;controls:BindablePicker /&gt;
    &lt;ListView HorizontalOptions="Center" &gt;
      &lt;ListView.ItemTemplate&gt;
        &lt;DataTemplate&gt;
          &lt;ViewCell&gt;
            &lt;ViewCell.View&gt;
              &lt;StackLayout Orientation="Horizontal"&gt;
                &lt;controls:BindablePicker Title="Length" /&gt;
                &lt;controls:BindablePicker Title="Units" /&gt;
              &lt;/StackLayout&gt;
            &lt;/ViewCell.View&gt;
          &lt;/ViewCell&gt;
        &lt;/DataTemplate&gt;
      &lt;/ListView.ItemTemplate&gt;
    &lt;/ListView&gt;
  &lt;/StackLayout&gt;
  </code></pre>
  
  <p>Everything is left justified and takes up the entire screen:
  <a href="https://i.stack.imgur.com/EZKJ5.png" rel="nofollow noreferrer">Left justified</a></p>
  
  <p>I'd like the widths of all controls to be as short as possible centered on the screen.  Right now I'm using a ListView because I'm binding a list of objects and I thought that would be easier than trying to use a Grid.</p>
  
  <p>Any suggestions would be greatly appreciated.  Thanks.</p>
  
  <p><strong>UPDATE</strong>  I updated my ViewCell to replace the StackLayout with a Grid, then put the ListView inside a grid as follows:</p>
  
  <pre><code>&lt;Grid&gt;
    &lt;Grid.RowDefinitions&gt;
      &lt;RowDefinition Height="*" /&gt;
    &lt;/Grid.RowDefinitions&gt;
    &lt;Grid.ColumnDefinitions&gt;
      &lt;ColumnDefinition Width="*" /&gt;
      &lt;ColumnDefinition Width="2*" /&gt;
      &lt;ColumnDefinition Width="*" /&gt;
    &lt;/Grid.ColumnDefinitions&gt;
    &lt;ListView Grid.Row="0" Grid.Column="1" HorizontalOptions="Center" SeparatorVisibility="None"&gt;
  </code></pre>
  
  <p>This is pretty much what I want, except the top picker is taking up the entire width of the screen, instead of being only as wide as it needs to be and centered.</p>