private async void GetData_Click(object sender, RoutedEventArgs e) { if (APIHelper.CheckForInternetConnection()) { TrueList = new List <CheckListDataModel>(); FalseList = new List <CheckListDataModel>(); clearlists(); var rawData = await SchoolChecklistProcessor.GetCheckListDataAysnc(); foreach (CheckListDataModel x in rawData) { if (x.Completed) { TrueList.Add(x); PossativeList.Items.Add(x.Title); } else { FalseList.Add(x); NegativeList.Items.Add(x.Title); } } } else { MessageBox.Show("Please make sure you have a active internet connection then retrying", "No internet Connection", MessageBoxButton.OK, MessageBoxImage.Error); } }