title: Xamarn forms: How to show a listview under a listview item?
body: <p>I need to show a list of classes in my UI. Under each class have some options like homework, attendance, etc. </p>
  
  <p><strong>Screenshot:</strong></p>
  
  <p><a href="https://i.stack.imgur.com/idXUf.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/idXUf.jpg" alt="enter image description here"></a></p>
  
  <p>I have implemented the list of classes using the ListView feature. How can I include the options under the listview? </p>
  
  <p>I have created a sample project <a href="https://drive.google.com/open?id=1hEOiZZk54TpPEK3swYLS_acCmH0oJQK4" rel="nofollow noreferrer">here</a> with the list of classes. Also I have created a function of options, How can I append the options as a sublist of classist?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p><strong>My options under each item is same</strong> so I have done like below:</p>
  
  <pre><code>&lt;StackLayout BindableLayout.ItemsSource="{Binding  AllItems,Mode=TwoWay}"&gt;
          &lt;BindableLayout.ItemTemplate&gt;
              &lt;DataTemplate&gt;
                  &lt;Expander&gt;
                      &lt;Expander.Header&gt;
                          &lt;Label Text="{Binding title}"
                             FontAttributes="Bold"
                             FontSize="Medium" /&gt;
                      &lt;/Expander.Header&gt;
                      &lt;Expander.ContentTemplate&gt;
                          &lt;DataTemplate&gt;
                              &lt;StackLayout Orientation="Vertical"&gt;
                                  &lt;Label 
                                  Text="option1"
                                  FontAttributes="Italic"&gt;
                                      &lt;Label.GestureRecognizers&gt;
                                          &lt;TapGestureRecognizer
                                          Tapped="LoadOption1"
                                          NumberOfTapsRequired="1"&gt;
                                          &lt;/TapGestureRecognizer&gt;
                                      &lt;/Label.GestureRecognizers&gt;
                                  &lt;/Label&gt;
  
                                  &lt;Label 
                                  Text="option2"
                                  FontAttributes="Italic"/&gt;
  
                                  &lt;Label 
                                  Text="option3"
                                  FontAttributes="Italic"/&gt;
                              &lt;/StackLayout&gt;
                          &lt;/DataTemplate&gt;
                      &lt;/Expander.ContentTemplate&gt;
                  &lt;/Expander&gt;
              &lt;/DataTemplate&gt;
          &lt;/BindableLayout.ItemTemplate&gt;
      &lt;/StackLayout&gt;
  </code></pre>
  
  <p>Label gesture function:</p>
  
  <pre><code>public async void LoadOption1(object sender, EventArgs args)
  {
      //How can I get the selected class(selected Expander Header) details here
  }
  </code></pre>