I’m writing a Windows 8 Metro app with a GridView with several pages worth of items. I’d like to provide the user with an incremental-search kind of filtering capability. I’m thinking it would pop up a text field as soon as the user starts typing.
I thought that implementing the search contract might be the way to accomplish this, but it doesn’t appear to have the incremental behavior I’m looking for.
Anyone know of an example of something like this?
Thanks.
You can wire into the SuggestionsRequested event from the SearchPane.getForCurrentView(). As the user types, you could process each key stroke and filter the data you are displaying in the Grid.
Having said that, filtering is usually implemented directly in the UI and not via the Search contract. Thus, I like your idea of going with a text field and processing each keystroke.