async void OnTripClicked(object sender, EventArgs e) { var tripsPage = new TripsPage(); // Disable back button on next page NavigationPage.SetHasBackButton(tripsPage, false); await Navigation.PushAsync(tripsPage); }
// When user wants to save a trip async void OnSaveButtonClicked(object sender, EventArgs e) { // Remove any attractions user chose to remove before navigating to next page RemoveAttractions(); // Data for current trip DataDisplay data = displayedData; // Add data for trip to object that stores data for all trips TripsPage.AllTripsDataDisplayed.Add(data); var tripsPage = new TripsPage(); // Disable back button on next page NavigationPage.SetHasBackButton(tripsPage, false); await Navigation.PushAsync(tripsPage); }