示例#1
0
        private async void NavMain_OnSelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args)
        {
            NavigationViewItem nowitem = (NavigationViewItem)sender.SelectedItem;

            if (nowitem.Tag.ToString() == "PageMe" && !Common.Logined)
            {
                await DialogLogin.ShowAsync();

                return;
            }

            switch (nowitem.Tag.ToString())
            {
            case "PageMe":
                Common.BaseFrame.Navigate(typeof(Pages.Me), null, new EntranceNavigationTransitionInfo());
                break;

            case "PageHome":
                Common.BaseFrame.Navigate(typeof(Pages.Home), null, new EntranceNavigationTransitionInfo());
                break;

            case "PageSearch":
                Common.BaseFrame.Navigate(typeof(Search), null, new EntranceNavigationTransitionInfo());
                break;

            case "PageSettings":
                Common.BaseFrame.Navigate(typeof(Pages.Settings), null, new EntranceNavigationTransitionInfo());
                break;
            }
        }
        private void NavView_SelectionChanged(Windows.UI.Xaml.Controls.NavigationView sender, Windows.UI.Xaml.Controls.NavigationViewSelectionChangedEventArgs args)
        {
            Windows.UI.Xaml.Controls.NavigationViewItem e = sender.SelectedItem as Windows.UI.Xaml.Controls.NavigationViewItem;
            String Name = e.Name.ToString();

            switch (Name)
            {
            case "SearchFrame":
                contentFrame.Navigate(typeof(SearchPage));
                break;

            case "SettingsPage":
                contentFrame.Navigate(typeof(CodeSettingsPage));
                break;

            case "DocumentFrame":
                contentFrame.Navigate(typeof(DocumentPage));
                break;
            }
        }
示例#3
0
        private void MainNaviView_SelectionChanged(Windows.UI.Xaml.Controls.NavigationView sender, Windows.UI.Xaml.Controls.NavigationViewSelectionChangedEventArgs args)
        {
            if (args.IsSettingsSelected)
            {
            }
            else
            {
                NavigationViewItem item = args.SelectedItem as NavigationViewItem;
                switch (item.Tag.ToString())
                {
                case Const.NaviActivity:
                    MainFrame.Navigate(typeof(NewsPage));
                    //sender.Header = "Activity";
                    break;

                case Const.NaviNotif:
                    //sender.Header = "Notification";
                    break;

                case Const.NaviTrend:
                    //sender.Header = "Trend";
                    break;

                case Const.NaviIssue:
                    //sender.Header = "Issue";
                    break;

                case Const.NaviProfile:
                    MainFrame.Navigate(typeof(ProfilePage));
                    //sender.Header = "My Profile";
                    break;

                case Const.NaviMyRepos:
                    //sender.Header = "My Repositories";
                    break;

                case Const.NaviMyStarred:
                    //sender.Header = "My Starred";
                    break;

                case Const.NaviBookmarks:
                    //sender.Header = "My Bookmark";
                    break;
                }
            }
        }
        private void NavigationView_SelectionChanged(UIControls.NavigationView sender, UIControls.NavigationViewSelectionChangedEventArgs args)
        {
            try
            {
                if (args.SelectedItem is UIControls.NavigationViewItem item)
                {
                    switch (item.Content)
                    {
                    case "Home":
                        frame.Content = new HomePage();
                        break;

                    case "Shop":
                        frame.Content = new ShopPage();
                        break;

                    case "Payments":
                        frame.Content = new PaymentsPage();
                        break;

                    case "Reports":
                        frame.Content = new ReportsPage();
                        break;

                    case "Locate Branch":
                        frame.Content = new BranchPage();
                        break;

                    case "Profile Settings":
                        frame.Content = new ProfileSettingsPage();
                        break;

                    default:
                        break;
                    }
                }
            }
            catch (Exception)
            {
            }
        }