// </snippet812>

        public override void OnSearchApplication(SearchEventArgs args)
        {
            if (!string.IsNullOrEmpty(args.QueryText))
            {
                NavigationService.Navigate("SearchResults", args.QueryText);
            }
            else
            {
                NavigationService.Navigate("Hub", null);
            }
        }
        // </snippet701>

        private void OnQuerySubmitted(SearchPane sender, SearchPaneQuerySubmittedEventArgs args)
        {
            var newArgs = new SearchEventArgs(args);
            OnSearchApplication(newArgs);
        }
 public virtual void OnSearchApplication(SearchEventArgs args) { }
        protected async override void OnSearchActivated(SearchActivatedEventArgs args)
        {
            // If the Window isn't already using Frame navigation, insert our own Frame
            var rootFrame = await InitializeFrameAsync(args);

            if (rootFrame != null)
            {
                var newArgs = new SearchEventArgs(args);
                OnSearchApplication(newArgs);
            }

            // Ensure the current window is active
            Window.Current.Activate();
        }