StackLayout BuildListView(RootPageViewModel viewModel) { var headerTemplate = new DataTemplate(typeof(ModuleMediaListHeaderTemplate)); headerTemplate.CreateContent(); var itemTemplate = new DataTemplate(typeof(ModuleMediaListItemTemplate)); itemTemplate.CreateContent(); _listView = new ListView { ItemsSource = viewModel.MediaSections, IsGroupingEnabled = true, GroupDisplayBinding = new Binding("SectionName"), HasUnevenRows = false, GroupHeaderTemplate = headerTemplate, ItemTemplate = itemTemplate }; return(new StackLayout { Children = { _listView } }); }
protected override void Init() { var vm = new RootPageViewModel(); Content = BuildListView(vm); }
public Issue1590() { var vm = new RootPageViewModel(); Content = BuildListView(vm); }