Example #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();
            }
        }
Example #2
0
        async void Favourites_btn_Clicked(System.Object sender, System.EventArgs e)
        {
            this.favClicked  = true;
            this.histClicked = false;
            DeleteWelcomeLabels();
            my_list_view.IsVisible = false;
            //setting del BindingContext
            MyFavoritesPageViewModel fav = new MyFavoritesPageViewModel();

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

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

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