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.
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.