/// <summary>
        /// Invoked when the application is activated through a search association.
        /// </summary>
        /// <param name="args">Event data for the event.</param>
        // Documentation on using search is at http://go.microsoft.com/fwlink/?LinkID=288822&clcid=0x409
        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 searchQueryArguments = new SearchQueryArguments(args);
                OnSearchApplication(searchQueryArguments);
            }

            // Ensure the current window is active
            Window.Current.Activate();
        }
 /// <summary>
 /// Called when any of the search entry points are triggered. You do not need to override this method if your application does not implement the Search contract.
 /// </summary>
 /// <param name="args">The search query arguments.</param>
 protected virtual void OnSearchApplication(SearchQueryArguments args) { }
 /// <summary>
 /// Called when a search is performed when the application is running.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="args">The <see cref="SearchPaneQuerySubmittedEventArgs"/> instance containing the event data.</param>
 private void OnQuerySubmitted(SearchPane sender, SearchPaneQuerySubmittedEventArgs args)
 {
     var searchQueryArguments = new SearchQueryArguments(args);
     OnSearchApplication(searchQueryArguments);
 }
        /// <summary>
        /// Invoked when the application is activated through a search association.
        /// </summary>
        /// <param name="args">Event data for the event.</param>
        // Documentation on using search is at http://go.microsoft.com/fwlink/?LinkID=288822&clcid=0x409
        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 searchQueryArguments = new SearchQueryArguments(args);
                OnSearchApplication(searchQueryArguments);
            }

            // Ensure the current window is active
            Window.Current.Activate();
        }
 /// <summary>
 /// Called when any of the search entry points are triggered. You do not need to override this method if your application does not implement the Search contract.
 /// </summary>
 /// <param name="args">The search query arguments.</param>
 protected virtual void OnSearchApplication(SearchQueryArguments args)
 {
 }
        /// <summary>
        /// Called when a search is performed when the application is running.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="args">The <see cref="SearchPaneQuerySubmittedEventArgs"/> instance containing the event data.</param>
        private void OnQuerySubmitted(SearchPane sender, SearchPaneQuerySubmittedEventArgs args)
        {
            var searchQueryArguments = new SearchQueryArguments(args);

            OnSearchApplication(searchQueryArguments);
        }