private void OnSearchCompleted (object sender, SearchCompletedEventArgs e) { if (viewModel.Groups == null) { listView.ItemsSource = new string [1]; } else { listView.ItemsSource = viewModel.Groups; } }
void HandleSearchCompleted (object sender, SearchCompletedEventArgs e) { // Only update the UI if these are the results for the last search if (e.SearchText == lastSearchText && e.SearchProperty == lastSearchProperty) { activity.Value.Stop (); if (lastTableView != null) { var data = (PeopleGroupsDataSource)lastTableView.DataSource; data.Groups = searchViewModel.Groups; lastTableView.ReloadData (); } } }