private void populateTaskComplete(object sender, TaskWorkerEventArgs e) { ProgressBarVisibility = Visibility.Hidden; ProgressBarIsEnabled = false; if (e.Cancelled) { return; } Page personPage = null; if (e.Results != null && e.Results is Page) { personPage = e.Results as Page; } PersonTableResults.Clear(); currentSearch = SearchTextbox; if (personPage.Results != null) { foreach (MultiModel person in personPage.Results) { PersonTableResults.Add(person); } PageCount = personPage.TotalPages; PageCurrent = personPage.ActivePage; } }
private void refreshCommand(object parameter) { cancelTasks(); PageCount = 0; PageCurrent = 0; PersonTableResults.Clear(); refreshContext(); }