Exemplo n.º 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();
        }
Exemplo n.º 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();
        }