title: How to create an accordion in Xamarin.Forms ListView
body: <p>How can I create an accordion in a <code>ListView</code> with data binding?
  I am creating this app with <code>Xamarin.Forms</code>.</p>
  
  <p>This is what I have so far:</p>
  
  <pre><code>&lt;ListView x:Name="List" HasUnevenRows="True" &gt;
    &lt;ListView.ItemTemplate&gt;
      &lt;DataTemplate&gt;
        &lt;ViewCell&gt;
          &lt;ViewCell.View&gt;
            &lt;Grid Padding="10,10,10,10"&gt;
              &lt;Grid.RowDefinitions&gt;
                &lt;RowDefinition Height="Auto"&gt;&lt;/RowDefinition&gt;
                &lt;RowDefinition Height="Auto"&gt;&lt;/RowDefinition&gt;
              &lt;/Grid.RowDefinitions&gt;
              &lt;Grid.ColumnDefinitions&gt;
                &lt;ColumnDefinition Width="*" /&gt;
                &lt;ColumnDefinition Width="*" /&gt;
              &lt;/Grid.ColumnDefinitions&gt;
              &lt;Label Text="ABC:-" FontSize="20" TextColor="Black" Grid.Column="0" Grid.Row ="0"/&gt;
              &lt;Label Text="{Binding ABC}" FontSize="20" TextColor="Black" Grid.Column="1" Grid.Row ="0" HorizontalOptions="EndAndExpand" VerticalOptions="FillAndExpand"/&gt;
              &lt;Label Text="XYZ:-" FontSize="20" TextColor="Black" Grid.Column="0" Grid.Row ="1"/&gt;
              &lt;Label Text="{Binding XYZ}" FontSize="20" TextColor="Black" Grid.Column="1" Grid.Row ="1" HorizontalOptions="EndAndExpand" VerticalOptions="FillAndExpand"/&gt;
             &lt;/Grid&gt;
          &lt;/ViewCell.View&gt;
        &lt;/ViewCell&gt;
      &lt;/DataTemplate&gt;
    &lt;/ListView.ItemTemplate&gt;
  &lt;/ListView&gt;
  </code></pre>