I am using an Expander
for showing units and chapters of a book. I am able to show the units as the Expander.Header
, but the chapters under the uni
There are two mistaken in your code .
Incorrect binding path .
Miss BindableLayout.ItemTemplate
inside the inner stackLayout .
Replace your xaml with
5
8
5
5
8
5
xaml.cs
//expander child tapping gesture
public void LoadChapter(object sender, EventArgs args)
{
var view = (View)sender;
var model = view.BindingContext as ContentList;
Debug.WriteLine("title:>>" + model.title);
}