示例#1
0
        private void LoadMorePage_Loaded(object sender, RoutedEventArgs e)
        {
            Contacts = Contact.GetContacts(30);
            MasterListView.DataContext = this;
            MasterListView.LoadMore    = async() =>
            {
                if (_currentPageNum < MAX_PAGE)
                {
                    await Task.Delay(2000);

                    _currentPageNum++;
                    Contact.GetContacts(30).ToList().ForEach(o => Contacts.Add(o));
                }
                MasterListView.FinishLoadingMore();
            };
        }
        private void LoadMorePage_Loaded(object sender, RoutedEventArgs e)
        {
            _allContacts = Contact.GetContactsGrouped(100);
            UpdateContactsForPage();
            MasterListView.LoadMore = async() =>
            {
                if (_currentPageNum < MAX_PAGE)
                {
                    await Task.Delay(2000);

                    _currentPageNum++;
                    UpdateContactsForPage();
                }
                MasterListView.FinishLoadingMore();
            };
        }