Beispiel #1
0
        public async void My_list_view_Refreshing(System.Object sender, System.EventArgs e)
        {
            if (this.favClicked)
            {
                //setting del BindingContext
                MyFavoritesPageViewModel fav = new MyFavoritesPageViewModel();
                await fav.GetInfoAsync();

                BindingContext = fav;
                my_list_view.EndRefresh();
            }

            else if (this.histClicked)
            {
                //setting del BindingContext
                MyHistoryPageViewModel his = new MyHistoryPageViewModel();
                await his.GetInfoAsync();

                BindingContext = his;
                my_list_view.EndRefresh();
            }
        }
Beispiel #2
0
        async void History_btn_Clicked(System.Object sender, System.EventArgs e)
        {
            this.favClicked  = false;
            this.histClicked = true;
            DeleteWelcomeLabels();
            my_list_view.IsVisible = false;
            //setting del BindingContext
            MyHistoryPageViewModel his = new MyHistoryPageViewModel();

            Loading.IsVisible = true;
            await his.GetInfoAsync();

            Loading.IsVisible                = false;
            my_list_view.IsVisible           = true;
            BindingContext                   = his;
            my_list_view.SeparatorVisibility = 0;

            //setting del colore in base al tema del dispositivo
            Favourites_btn.SetAppThemeColor(Label.TextColorProperty, Color.Black, Color.White);
            Favourites_btn.FontSize = 25;
            History_btn.TextColor   = violetto;
            History_btn.FontSize    = 28;
        }