public async void NavigateToShellSection(ShellSection shellSection) { if (ShellSection != shellSection) { if (ShellSection != null) { ShellSection.PropertyChanged -= ShellSectionOnPropertyChanged; ShellSectionController.ItemsCollectionChanged -= ShellSectionControllerOnItemsCollectionChanged; ShellSection = null; } ShellSection = shellSection; ShellSection.PropertyChanged += ShellSectionOnPropertyChanged; ShellSectionController.ItemsCollectionChanged += ShellSectionControllerOnItemsCollectionChanged; } UpdateTopTabs(); var content = shellSection.CurrentItem; Page nextPage = (shellSection as IShellSectionController) .PresentedPage ?? ((IShellContentController)content)?.GetOrCreateContent(); SectionFrame.Navigate(new ShellPageWrapper()); await Task.Delay(100); var shellSectionCurrent = Shell.CurrentItem.CurrentItem; NavigateToContent(new NavigationRequestedEventArgs(nextPage, true), shellSectionCurrent); }
private void OnInsertRequested(NavigationRequestedEventArgs args) { var pageIndex = ShellSection.Stack.ToList().IndexOf(args.Page); if (pageIndex == ((IEnumerable <object>)SectionFrame.BackStack).Count() - 1) { SectionFrame.Navigate(new ShellPageWrapper()); } else { // // ((IEnumerable<object>)SectionFrame.BackStack). } }
private async void OnPushRequested(NavigationRequestedEventArgs args) { SectionFrame.Navigate(new ShellPageWrapper()); }