Improve the usability of search in your Windows Style App

When your app could do with the search feature, implement it. But something that’s even more important is the discoverability of search. Not everyone knows how use the charms bar, or doesn’t want to use the charms. When you just start typing in the Store app it starts immediately showing the search pane with the input characters. I suggest you do the same when your apps supports search. How?

One line of code in your App OnLaunched method, I added it just after Window.Current.Activate().

// Show search on keyboard input.
SearchPane.GetForCurrentView().ShowOnKeyboardInput = true;

 

I know this is a very short post, but the API was pretty unknown to me until I tried it myself.

Update 23-01-2013:

Chris Veeningen (@Bloodyairtimer) explained to me that this should only be used on read-only views. So if you instead have an input box in your view this won’t work. So instead you could put the above line of code in the OnNavigatedTo method of your readonly views. I would also set it to false in the OnNavigateTo method of the views that contains input fields. Hope this helps a bit.

Gravatar