Ejemplo n.º 1
0
 void searchPane_QuerySubmitted(Windows.ApplicationModel.Search.SearchPane sender, Windows.ApplicationModel.Search.SearchPaneQuerySubmittedEventArgs args)
 {
     if (this.Frame.CanGoBack)
     {
         this.Frame.GoBack();
     }
 }
Ejemplo n.º 2
0
        void SplashPage_SuggestionsRequested(Windows.ApplicationModel.Search.SearchPane sender,
                                             Windows.ApplicationModel.Search.SearchPaneSuggestionsRequestedEventArgs args)
        {
            var query = args.QueryText.ToLower();

            if (query.Length < 3)
            {
                return;
            }

            var suggestions = (from g in App.Instance.DataSource.GroupList
                               from i in g.Items
                               from keywords in i.Title.Split(' ')
                               let keyword = Regex.Replace(
                                   keywords.ToLower(), @"[^\w\.@-]", "")
                                             where i.Title.ToLower().Contains(query) &&
                                             keyword.StartsWith(query)
                                             orderby keyword
                                             select keyword).Distinct();

            args.Request.SearchSuggestionCollection.AppendQuerySuggestions(suggestions);
        }
Ejemplo n.º 3
0
 void searchPane_QuerySubmitted(Windows.ApplicationModel.Search.SearchPane sender, Windows.ApplicationModel.Search.SearchPaneQuerySubmittedEventArgs args)
 {
     SearchButton.Command.Execute(sender.QueryText);
 }