Dynamic Population of the Suggestion List
Until now you have looked at using only predefined suggestion lists. There are times, however, when you may want to change the contents of the suggestion list based on what the user has entered. One example is performing a web search for the entered text and using the search results as the suggestion list. The user enters some text, and you call a website to get a list of suggestions. Once the call completes you populate the ItemsSource
property of the AutoCompleteBox
. This entails an asynchronous operation, which means you need some way of telling the AutoCompleteBox
to dispense with filtering until the result of the asynchronous call is obtained. Fortunately, the AutoCompleteBox
contains a built-in ...
Get Windows® Phone 8 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.