예제 #1
0
        public BooksPage(MainPage mainPage)
        {
            this.MainPage = mainPage;

            BindingContext = new BooksIncrementalView(BooksManager.Categories.Values.FirstOrDefault());

            InitializeComponent();
        }
예제 #2
0
        async void OnPickerSelectedItem(object sender, EventArgs e)
        {
            BooksIncrementalView booksListIncrementalView = null;

            string selectedCategory = listPicker.Items[listPicker.SelectedIndex];
            string listName         = BooksManager.GetListNameByCategory(selectedCategory);

            booksListIncrementalView = new BooksIncrementalView(listName);

            BindingContext = booksListIncrementalView;

            booksListIncrementalView.LoadMoreItemsCommand.Execute(null);
        }
예제 #3
0
        protected override void OnAppearing()
        {
            base.OnAppearing();

            BooksIncrementalView vm = BindingContext as BooksIncrementalView;

            vm.LoadMoreItemsCommand.Execute(null);

            foreach (string category in BooksManager.Categories.Keys)
            {
                listPicker.Items.Add(category);
            }
        }