void AddClicked(object sender, EventArgs e) { City newCity = new City(); var cityDetailPage = new CityDetailsPage(); cityDetailPage.BindingContext = newCity; cityList.IsVisible = false; Navigation.PushAsync(cityDetailPage); }
void citySelected(object sender, SelectedItemChangedEventArgs e) { if (e.SelectedItem != null) { var city = (City)e.SelectedItem; var cityDetailPage = new CityDetailsPage(); cityDetailPage.BindingContext = city; cityList.IsVisible = false; Navigation.PushAsync(cityDetailPage); } }