public RestaurantPage(RestaurantListView restaurant) { InitializeComponent(); ((NavigationPage)Application.Current.MainPage).BarBackgroundColor = Color.FromHex("#e21f4f"); this.restaurant = restaurant; CreatePage(); }
public void CreateList() { var listView = new ListView(); listView.ItemsSource = listifyMeals(meals); listView.ItemTemplate = new DataTemplate(typeof(RestaurantListCell)); listView.ItemTapped += async(sender, e) => { MealListView m = (MealListView)e.Item; Restaurant r = App.Database.GetRestaurantById(m.restaurantId); RestaurantListView rest = new RestaurantListView(r.name, r.rating, r.price, r.Id); //navManager.showRestaurantPage(rest); navManager.showMealPage(m); }; Padding = new Thickness(0, 20, 0, 0); Content = listView; }
public void showRestaurantPage(RestaurantListView rest) { //navigation.PopAsync(); navigation.PushAsync(new RestaurantPage(rest)); }