locked
Triggering search charm programmatically RRS feed

  • Question

  • Hi all,

    is there a possibility to activate the search charm through a JS call and set/predfine the value of the search box? Reason is, I like to have users being able to select text in my app and directly sending the marked text to the search box in the search charm. Of course, users could also copy the text, hitting WIN-C, selecting search and paste the text into the search box.

    Any way to do this programmatically? Thanks!

    Best Regards
    --Oliver.

    Tuesday, March 27, 2012 10:31 AM

Answers

  • Sure, you can show the search charm yourself:

    searchPane = Windows.ApplicationModel.Search.SearchPane.getForCurrentView();
    searchPane.show("your selected text");


    Tuesday, March 27, 2012 1:23 PM

All replies

  • Sure, you can show the search charm yourself:

    searchPane = Windows.ApplicationModel.Search.SearchPane.getForCurrentView();
    searchPane.show("your selected text");


    Tuesday, March 27, 2012 1:23 PM
  • Is there anyway to trigger the same event from a web page rather than within an app?
    Tuesday, September 24, 2013 9:22 AM