Beispiel #1
0
        /// <summary>
        /// Resets the navigation stack and pushes to Home page.
        /// </summary>
        /// <param name="viewmodel"></param>
        /// <returns></returns>
        public async Task PopAllTo(HomeViewmodel viewmodel)
        {
            if (viewmodel == null)
            {
                return;
            }
            HomePage page = new HomePage(viewmodel);

            if (page == null)
            {
                return;
            }
            Navigation.InsertPageBefore(page, Navigation.NavigationStack.First());
            await Navigation.PopToRootAsync();
        }
Beispiel #2
0
        /// <summary>
        /// Resets the navigation stack and pushes to Home page.
        /// </summary>
        /// <param name="viewmodel"></param>
        /// <returns></returns>
        public async Task PopAllTo(HomeViewmodel viewmodel)
        {
            if (viewmodel == null)
            {
                return;
            }
            HomePage page = new HomePage(viewmodel); //replace 'page' with the page you want to reset to

            if (page == null)
            {
                return;
            }
            Navigation.InsertPageBefore(page, Navigation.NavigationStack.First());
            await Navigation.PopToRootAsync();
        }