Esempio n. 1
0
        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 }
            });
        }
Esempio n. 2
0
        protected override void Init()
        {
            var vm = new RootPageViewModel();

            Content = BuildListView(vm);
        }
Esempio n. 3
0
        public Issue1590()
        {
            var vm = new RootPageViewModel();

            Content = BuildListView(vm);
        }