0

I would like to know how can I implement the search contract from within the app, to search/find a few files present inside the application.

As far as I know, there are a lot of articles especially from msdn, blogs, etc which helps us create a normal search contract to search/look for apps/books, etc on win8 system, but I have not come across any valuable source for implementing search within the app.

Your response will eb of great help to me :) Thanks in advance..!

dmurali
  • 211
  • 1
  • 6
  • 14

1 Answers1

1

As I know, you can add a search contract using Add a New Item command in Visual Studio. The IDE will register the appropriate handlers to catch QuerySubmitted event or Search Activated events. The former is used for capturing search event while your application is the main app on screen and the second one is for situations where your application is not running as the active app.

What you search in your application isn't important. It's completely your own business. You can search for files inside your apps or anything else.

Recently I've read an article on MSDN about this. Maybe useful for you too

Adding search to an app

Also similar issue here on StackOverflow

Community
  • 1
  • 1
zaerymoghaddam
  • 3,037
  • 1
  • 27
  • 33
  • thanx a ton @moghaddam..!! I am referring to the prescribed articles and I hope i figure out the solution..! – dmurali Sep 19 '13 at 13:09
  • 1
    Also, it looks like http://jeffblankenburg.com/2012/11/06/31-days-of-windows-8-day-6-search-contract is also a good sample for me to start with..!! – dmurali Sep 19 '13 at 13:10
  • ok..This works now..!! But is there any way to add a search index within an app? say, for instance, search with A-E, F-K, and so on..? – dmurali Sep 23 '13 at 08:54
  • What do you mean by adding a search index? Do you have some data inside your app which needs to be indexed to make finding results faster? – zaerymoghaddam Sep 23 '13 at 16:23