private async void Window_Loaded(object sender, RoutedEventArgs e) { var results = await Api.SearchPlace(SearchString, 25); if (results.Succeeded) { var places = results.Value; List <Location> Locations = new List <Location>(); places.Items.ToList().ForEach(p => Locations.Add(new Location { Title = p.Title, FbLocation = p.Location })); lstLocations.ItemsSource = null; lstLocations.ItemsSource = Locations; lstLocations.DisplayMemberPath = "Title"; progressBar.Visibility = Visibility.Collapsed; } else { MessageBox.Show("Something Went wrong."); this.Close(); } }