Ejemplo n.º 1
0
        /// <summary>
        /// 导航栏
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="args"></param>
        private void Nvall_ItemInvoked(NavigationView sender, NavigationViewItemInvokedEventArgs args)
        {
            if (args.IsSettingsInvoked)
            {
                //TODO设置页
                Homesuggestion.Navigate(typeof(SettingPage), myStruct);
            }
            else
            {
                switch (args.InvokedItem)
                {
                case "Account":
                    ContentViewFrame.Navigate(typeof(MyInfor), myStruct);
                    break;

                case "Home":
                    this.Frame.Navigate(typeof(HomePage), myStruct);
                    break;

                case "Qusition":
                    ContentViewFrame.Navigate(typeof(MakeQusition), myStruct);
                    break;

                case "Search":
                    Homesuggestion.Navigate(typeof(SearchlistPage), myStruct);
                    break;

                case "Answer":
                    Homesuggestion.Navigate(typeof(Qusitionviewpage), myStruct);
                    break;

                case "Artical":
                    Homesuggestion.Navigate(typeof(SearchlistArtical));
                    break;

                case "Draft":
                    ContentViewFrame.Navigate(typeof(MyDraft));
                    break;

                case "Notice":
                    ContentViewFrame.Navigate(typeof(Notice));
                    break;

                default:
                    break;
                }
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// 搜索按钮
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void SearchButton_Click(object sender, Windows.UI.Xaml.RoutedEventArgs e)
 {
     Homesuggestion.Navigate(typeof(SearchlistPage));
 }