locked
How to use SearchPane.HideThisApplication RRS feed

  • Question

  • How can i use SearchPane.HideThisApplication method?
    Are there examples available anywhere online?

    MSDN wrote only one line "Hides the current app's UI."
    However, what result will be specifically obtained? What conditions are required in order to use?


    biac [ http://bluewatersoft.cocolog-nifty.com/ ]

    Saturday, January 11, 2014 9:27 AM

Answers

  • Hello,

    This API is used to aid in search app navigation. If you have a search app, that is not displayed as the main app, you can use this API to hide your search app's UI.

    I hope this helps,

    James


    Windows SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/

    Wednesday, January 29, 2014 11:50 PM
    Moderator

All replies

  • Hi biac,

    Good Question! Every time I tried this method, always return me following exception: "Can't hide this app in the search pane because the app has already accessed the search pane."

    I will consult some senior engineers to see if we can provide a good answer for you. Thank you.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Monday, January 13, 2014 12:20 PM
    Moderator
  • Hi James, thank you.
    I'm waiting for the good reply.

    biac [ http://bluewatersoft.cocolog-nifty.com/ ]

    Monday, January 13, 2014 1:53 PM
  • Hello,

    What do you expect to accomplish when using this API?

    -James


    Windows SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/

    Friday, January 17, 2014 11:27 PM
    Moderator
  • Hello, James Dailey
    Thank you for your reply.

    > What do you expect to accomplish when using this API?
    -- It's just my question.

    MSDN says only one phrase.
    "Hides the current app's UI."

    What is "current app's UI"?
    When the method is called correctly, what will occur?
    And how can I call the method?


    biac [ http://bluewatersoft.cocolog-nifty.com/ ]

    Monday, January 27, 2014 2:13 AM
  • Hello,

    This API is used to aid in search app navigation. If you have a search app, that is not displayed as the main app, you can use this API to hide your search app's UI.

    I hope this helps,

    James


    Windows SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/

    Wednesday, January 29, 2014 11:50 PM
    Moderator
  • Hello, James Dailey
    Thank you for your reply.

    i understood!

    The following app is a Win8.1 store app equipped with the search contract.
    This app is listed in the search pane.

    I added one line as follows into the OnLaunched method of App class.

    protected override async void OnLaunched(LaunchActivatedEventArgs args)
    {
      Frame rootFrame = Window.Current.Content as Frame;
      if (rootFrame == null)
      {
        Windows.ApplicationModel.Search.SearchPane.HideThisApplication(); // <- HERE!
    
        // (snip...)
    

    Then, this app is not listed in the search pane any longer.

    However, calling SearchPane.GetForCurrentView method in this app causes System.UnauthorizedAccessException.

    ---
    my opinion:
    - search pane can not used
    - OnSearchActivated method is not called on Windows 8.1
    Is there any meaning which implemented search contract in such a situation?


    biac [ http://bluewatersoft.cocolog-nifty.com/ ]

    Friday, January 31, 2014 2:15 AM
  • Hello,

    I'm glad my explanation helped. Unfortunately I'm not sure that I understand your new question. Can you please give me more clear detail about your scenario?

    Thanks,

    James


    Windows SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/

    Tuesday, February 4, 2014 12:48 AM
    Moderator