The Search Contract

To integrate with the Search pane, you must support the Search contract. In Visual Studio 2012, you can do this by right-clicking your project, select Add, New Item..., and then choose Search Contract from the list. This option has been removed from Visual Studio 2013 and later, as newer apps aren’t expected to use the Search contract. If it’s not convenient for you to use Visual Studio 2012 and later migrate your app to Visual Studio 2013, then you can leverage the code that comes with this book’s download and add it to your app.

When you add a Search contract in Visual Studio 2012, it adds a search results page to your app similar to the one examined in the “SearchBox” section of Chapter 14. (It was designed for Windows ...

Get Universal Windows® Apps with XAML and C# Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.