/* * Everytime that the landingPage is at the top of the view stack -> RELOAD with this information */ public async void RefeshDataForCollectionOfWhises() { _mywishCollection.Clear(); foreach (var item in await DB.GetAllWhises()) { MyWishCollection.Add(item); Console.WriteLine("i am inside"); } }
/* * Display in a new page the details about the given wish selected by the user */ private void DisplayAWish() { if (_selectedWish != null) { // Sending the properties to the DetailsViewModel and pushing it to the bindingcontext on the "details" Page var viewModel = new DetailsViewModel { SelectedWish = _selectedWish, Wishes = MyWishCollection, Position = MyWishCollection.IndexOf(_selectedWish) }; var detailsPage = new DetailsPage(); detailsPage.BindingContext = viewModel; // navigate to the details page var navigation = Application.Current.MainPage as NavigationPage; navigation.PushAsync(detailsPage, true); _selectedWish = null; } }