locked
Settings charm Search clicked RRS feed

  • Question

  •  We have developed  one app. In that when you click on  search button of setting charms it should search similar things in my app.

    for example

    in finance app ,if I typed any company name the  finance app searched  it and display the page of that particular company in the app. Similar thing I want implement.

     Please share any idea if anyone get. Thanks in Advance

    Thursday, January 17, 2013 11:35 AM

Answers

  • To have your app listed in the Search charm you have to implement Search contract. You can start from the following article - Adding search to an app


    http://lunarfrog.com/blog/

    • Proposed as answer by Can Bilgin Thursday, January 17, 2013 5:40 PM
    • Marked as answer by Aaron Xue Friday, February 1, 2013 7:41 AM
    Thursday, January 17, 2013 3:42 PM
  • Hi,

    There is QuerySubmitted event to get the search string from Charm pane when your app is on your main screen. Also,  Activated event to get the search string when your app isn't on your main screen. If you want to response to the search pane, try to register handlers to the events. You could check the article that Andrei showed you and there is sample which may help you:

    http://code.msdn.microsoft.com/windowsapps/Search-app-contract-sample-118a92f5/


    Aaron
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Proposed as answer by Can Bilgin Monday, January 21, 2013 1:02 PM
    • Marked as answer by Aaron Xue Friday, February 1, 2013 7:41 AM
    Monday, January 21, 2013 8:23 AM
  • just a small addition to Aaron's comment, you have to override the OnSearchActivated(SearchActivatedEventArgs args) method to actually implement the Search Contract (if you want your application to provide search results even if your application is not currently running).


    Can Bilgin
    Blog Samples CompuSight

    • Marked as answer by Aaron Xue Friday, February 1, 2013 7:41 AM
    Monday, January 21, 2013 1:02 PM

All replies

  • do you mean this?

    SearchPane.GetForCurrentView().ShowOnKeyboardInput = true


    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    Thursday, January 17, 2013 11:56 AM
  • To have your app listed in the Search charm you have to implement Search contract. You can start from the following article - Adding search to an app


    http://lunarfrog.com/blog/

    • Proposed as answer by Can Bilgin Thursday, January 17, 2013 5:40 PM
    • Marked as answer by Aaron Xue Friday, February 1, 2013 7:41 AM
    Thursday, January 17, 2013 3:42 PM
  • I want to implement the code in which my App should response to searching pane present in  charm bar.

     

    Friday, January 18, 2013 6:58 AM
  • Hi,

    There is QuerySubmitted event to get the search string from Charm pane when your app is on your main screen. Also,  Activated event to get the search string when your app isn't on your main screen. If you want to response to the search pane, try to register handlers to the events. You could check the article that Andrei showed you and there is sample which may help you:

    http://code.msdn.microsoft.com/windowsapps/Search-app-contract-sample-118a92f5/


    Aaron
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Proposed as answer by Can Bilgin Monday, January 21, 2013 1:02 PM
    • Marked as answer by Aaron Xue Friday, February 1, 2013 7:41 AM
    Monday, January 21, 2013 8:23 AM
  • just a small addition to Aaron's comment, you have to override the OnSearchActivated(SearchActivatedEventArgs args) method to actually implement the Search Contract (if you want your application to provide search results even if your application is not currently running).


    Can Bilgin
    Blog Samples CompuSight

    • Marked as answer by Aaron Xue Friday, February 1, 2013 7:41 AM
    Monday, January 21, 2013 1:02 PM