private async void Handle_ItemTapped(object sender, ItemTappedEventArgs e) { if (e.Item == null) { return; } var weatherPage = new WeatherPage(); weatherPage.BindingContext = e.Item; await Navigation.PushAsync(weatherPage); ((ListView)sender).SelectedItem = null; }
public CitiesListPage(WeatherPage parent) { try { InitializeComponent(); _parent = parent; var Cities = App.Database.GetCities(); citiesList = new ObservableCollection <City>(); this.BindingContext = Cities; foreach (var city in Cities) { citiesList.Add(city); } MyListView.ItemsSource = citiesList; } catch (Exception npe) { System.Diagnostics.Debug.WriteLine(npe); } }
private void Weather_OnClicked(object sender, EventArgs e) { WeatherPage weather = new WeatherPage(); this.Navigation.PushAsync(weather); }