Invoked when the application is activated to display search results. Details about the activation request. protected async ...

        /// 
        /// Invoked when the application is activated to display search results.
        /// 
        /// Details about the activation request.
        protected async override void OnSearchActivated(Windows.ApplicationModel.Activation.SearchActivatedEventArgs e)
        {
            // TODO: Register the Windows.ApplicationModel.Search.SearchPane.GetForCurrentView().QuerySubmitted
            // event in OnWindowCreated to speed up searches once the application is already running

            // If the Window isn't already using Frame navigation, insert our own Frame
            var previousContent = Window.Current.Content;
            var frame = previousContent as Frame;

            // If the app does not contain a top-level frame, it is possible that this 
            // is the initial launch of the app. Typically this method and OnLaunched 
            // in App.xaml.cs can call a common method.
            if (frame == null)
            {
                // Create a Frame to act as the navigation context and associate it with
                // a SuspensionManager key
                frame = new Frame();
                $rootnamespace$.Common.SuspensionManager.RegisterFrame(frame, "AppFrame");

                if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
                {
                    // Restore the saved session state only when appropriate
                     try
                    {
                        await $rootnamespace$.Common.SuspensionManager.RestoreAsync();
                    }
                    catch ($rootnamespace$.Common.SuspensionManagerException)
                    {
                        //Something went wrong restoring state.
                        //Assume there is no state and continue
                    }
                }
            }

            frame.Navigate(typeof($safeitemname$), e.QueryText);
            Window.Current.Content = frame;

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