private async void getData() { progressBar.Visibility = Windows.UI.Xaml.Visibility.Visible; Linea linea = await DBSource.getLinea(nomeLinea); trains = new ObservableCollection <TrainStop>(); try { foreach (TrainStop trainstop in await linea.Fermate) { trains.Add(trainstop); } } catch (Exception) { //NIENTE } itemListView.ItemsSource = trains; NomeLinea.Text = linea.Name; progressBar.Visibility = Windows.UI.Xaml.Visibility.Collapsed; }