コード例 #1
0
        public RestaurantPage(RestaurantListView restaurant)
        {
            InitializeComponent();
            ((NavigationPage)Application.Current.MainPage).BarBackgroundColor = Color.FromHex("#e21f4f");

            this.restaurant = restaurant;
            CreatePage();
        }
コード例 #2
0
        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;
        }
コード例 #3
0
 public void showRestaurantPage(RestaurantListView rest)
 {
     //navigation.PopAsync();
     navigation.PushAsync(new RestaurantPage(rest));
 }