示例#1
0
        /// <summary>
        /// Invoked to when search suggestions are requested
        /// </summary>
        /// //TBD:
        //public static void searchPane_SuggestionsRequested(SearchPane sender, SearchPaneSuggestionsRequestedEventArgs args)
        //{
        //    // try to see if the user entered in something valid
        //    try
        //    {
        //        // Calculator serach
        //        string calcReturn = Calculator.Calc_MainPage.searchPane_SuggestionsRequested(args.QueryText);
        //        if (calcReturn != string.Empty)
        //            args.Request.SearchSuggestionCollection.AppendQuerySuggestion("Answer: " + calcReturn);

        //        // TODO : Notepad

        //        // TODO : TODO
        //    }
        //    catch { }
        //}
        #endregion

        private void AppsGridView_ItemClick(object sender, ItemClickEventArgs e)
        {
            MainPageItem item = e.ClickedItem as MainPageItem;

            //Navigate to the page, keeping the navigation context
            App.NavigateToPage(item.App, this.CurrentNavigationState);

            //Reset the navigation state in case the user navigates back during a Search
            if (CurrentNavigationState == App.NavigationStates.Search)
            {
                this.SetNavigationState(App.NavigationStates.Normal);
            }
        }
示例#2
0
 private void btnBack_Click_1(object sender, RoutedEventArgs e)
 {
     App.NavigateToPage(this.crumbs[crumbs.Count - 2].TargetPage, ((App)App.Current).lastNavState);
 }