Using AutoCompleteBox with MVVM

This section looks at controlling an AutoCompleteBox from a viewmodel. The example code for this section is located in the AutoCompleteBoxView and AutoCompleteBoxViewModel in the downloadable sample code.

AutoCompleteBox provides various ways for selecting the items to be displayed in the suggestion list. The AutoCompleteBox.FilterMode property allows you to specify how entered text is matched with items in the suggestion list. When a match occurs, the item is displayed in the selection list. If AutoCompleteFilterMode is not specified, the StartsWith filter mode is used, which is not a case-sensitive filter, where the returned items start with the entered text. Table 9.1 lists the FilterMode values.

TABLE 9.1. ...

Get Windows® Phone 8 Unleashed now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.