Example #1
0
        protected override async void OnAppearing()
        {
            if (facebookId == string.Empty & accessToken == string.Empty)
            {
                await Navigation.PushAsync(new Login());
            }
            else
            {
                var favorService = new FavorService();
                if (user != null)
                {
                    Zip.Text         = user.Zipcode;
                    Description.Text = user.Description;
                    Range.Text       = user.Range.ToString();
                    if (user.Services != null)
                    {
                        foreach (var item in user.Services)
                        {
                            listItems.Add(item);
                        }
                    }
                }
                ImageUrl.Source           = user.Imgurl;
                FnameLabel.Text           = user.Fname;
                LnameLabel.Text           = user.Lname;
                ListServices.ItemsSource  = listItems;
                PickerService.ItemsSource = await favorService.GetCategoriesAsync();

                base.OnAppearing();
            }
        }