예제 #1
0
        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);
        }
예제 #2
0
 public MainPage()
 {
     this.InitializeComponent();
     MainPageNavigationViewFrame.NavigateToType(typeof(TSPLSSAPage), null, null);
 }