Search contact context sensitive RRS feed

  • General discussion

  • Since implementing search inside an app is not recommended I wonder if the search contract could act context sensitive. Meaning you are already deep inside the app and want to search in that specific part/view of the app.

    Would you recommend an inline/in app filter control (text, date) to further reduce the current view or use the search contract for all of that instead?

    So if you already in the view where you see all your PNG files and you are looking for PNGs files with specific data you would have to open the search charm and it would only search in the current view or should that be done on the canvas using filter controls?

    Wednesday, May 30, 2012 12:46 PM

All replies

  • Phil,

    What you are describing is better handled by "find-in-page" and not a Search contract. 


    Jeff Sanders (MSFT)

    Friday, June 1, 2012 12:06 PM
  • I have to say that a scoped search doesn't really feel the same as a "find in page" to me. For example, in Windows Explorer you can make the same kind of queries inside a folder as from the Start menu in Windows 7 (or Files search in Windows 8). It is the same thing, just scoped differently, whereas find-in-page is something different. 

    I wish the "just start typing to search" mechanism from Start were adopted for apps as well. Not only is it convenient (or if you like "fast and fluid") but after doing it in Start I find I instinctively try it elsewhere and am disappointed when it doesn't work - feels like something is broken.

    Monday, June 4, 2012 1:57 AM
  • I have implemented what I called "instant search" like in the starmenu using this simple JS code:

    document.body.addEventListener('keypress', function(event) {
          var searchPane, _ref;
          if ((_ref = document.activeElement.tagName.toLowerCase()) === 'input' || _ref === 'select') {
          if (event.ctrlKey || event.key.length > 1) {
          searchPane = Windows.ApplicationModel.Search.SearchPane.getForCurrentView();
          return true;

    This is generated code from CoffeeScript, but I guess you get the idea :)

    Monday, June 4, 2012 8:14 AM