private void MainPageNavigationView_ItemInvoked(NavigationView sender, NavigationViewItemInvokedEventArgs args) { FrameNavigationOptions navOptions = new FrameNavigationOptions(); navOptions.TransitionInfoOverride = args.RecommendedNavigationTransitionInfo; if (sender.PaneDisplayMode == NavigationViewPaneDisplayMode.Top) { navOptions.IsNavigationStackEnabled = false; } var itemContainer = args.InvokedItemContainer.Name; Type pageType = null; if (itemContainer == "TSPLSSA") { pageType = typeof(TSPLSSAPage); } else if (itemContainer == "TSPGA") { pageType = typeof(TSPGAPage); } else if (itemContainer == "BPNN") { pageType = typeof(BPNNPage); } else if (itemContainer == "CNN") { pageType = typeof(CNNPage); } MainPageNavigationViewFrame.NavigateToType(pageType, null, navOptions); }
public MainPage() { this.InitializeComponent(); MainPageNavigationViewFrame.NavigateToType(typeof(TSPLSSAPage), null, null); }