private async void GetAllTasks(TaskViewModel viewModel) { ApplicationDataContainer local = ApplicationData.Current.LocalSettings; int tripID = Int32.Parse(local.Values["tripID"].ToString()); await viewModel.GetAllTasks(tripID); tasks = viewModel.Tasks; TaskList.ItemsSource = tasks; if (tasks.Count == 0 || tasks == null) { ProgressBar.Visibility = Visibility.Collapsed; } ProgressbarPercentageToDo(); }