How to Set the Minimum Characters for AutoCompleteBox to filter in Windows Phone ?

Your 2020 Plan. Learn 20 minutes a day for 20 days. Online courses from €9.99.

The AutoCompleteBox that is part of Silverlight Toolkit for Windows Phone by default shows the suggestions when you type one character in the AutoCompleteBox .

You can change this behaviour . For example , if you want to display the Suggestions in the Autocompletebox if you type 3 characters or more , you can set the property MinimumPrefixLength to 3 .

Assume that the AutocompleteBox has the following List as ItemSource .

public List<string> GetSports()


List<string> Sports = new List<string>();

Sports.Add("Cricket - One Day");

Sports.Add("Cricket - Test");


Sports.Add("Table Tennis");



return Sports;


If you Set the MinimumPrefixLength of the AutoCompleteBox to 3 , then you should get the the suggestion only when you type 3 or more characters as shown below

AutoCompleteBox txtbox = new AutoCompleteBox();

txtbox.MinimumPrefixLength = 3;


// Data

txtbox.ItemsSource = GetSports();

If you dont want the AutocompleteBox to show the suggested words , then set the MinimumPrefixLength of AutoCompleteBox to -1 .

Leave a Reply

Your email address will not be published. Required fields are marked *