Esempio n. 1
0
        public void InsertPageBefore(NavigationViewModel viewModel, NavigationViewModel before)
        {
            var pageBefore = FormsNavigation.NavigationStack.FirstOrDefault(x => x.BindingContext == before);
            var view       = InstantiateView(viewModel);

            FormsNavigation.InsertPageBefore((Page)view, pageBefore);
        }
Esempio n. 2
0
        /// <inheritdoc />
        public async Task PopToRootAsync(BaseNavigationViewModel vm, bool animate)
        {
            var navPage = InstantiateView(vm) as Page;

            var root = FormsNavigation.NavigationStack.First();

            FormsNavigation.InsertPageBefore(navPage, root);
            await FormsNavigation.PopToRootAsync(animate);
        }