示例#1
0
        protected override async void OnAppearing()
        {
            base.OnAppearing();

            if (mv.IsBusy == false)
            {
                GroupListView.BeginRefresh();
                await mv.PopulateGroups();

                GroupListView.ItemsSource = mv.Groups;
                GroupListView.EndRefresh();
            }
        }
示例#2
0
        private void SearchBar_TextChanged(object sender, TextChangedEventArgs e)
        {
            GroupListView.BeginRefresh();

            if (string.IsNullOrWhiteSpace(e.NewTextValue))
            {
                GroupListView.ItemsSource = mv.Groups;
            }
            else
            {
                GroupListView.ItemsSource = mv.Groups.Where(i => i.Name.Contains(e.NewTextValue));
            }

            GroupListView.EndRefresh();
        }