Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.
Enabling predictive text in a TextBox in Windows Phone
A TextBox is a control that can be used to display single-format, multi-line text. This article shows how to get Windows Phone to provide word prediction suggestions for partially entered text.
To enable the suggestion property in the TextBox we need to set InputScope to Text or Chat. First let’s create an empty project for WP7 and add a TextBox in the XAML file. Add the InputScope property to the TextBox component and set to Text or Chat.
<TextBox InputScope="Text" …/>
Now when user enters text on the TextBox it brings a suggestion list above the keyboard.
The full source code of the example is available here: File:SuggestionBoxWP7.zip