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. Thanks for all your past and future contributions.

Enabling predictive text in a TextBox in Windows Phone

From Wiki
Jump to: navigation, search
WP Metro Icon UI.png
SignpostIcon XAML 40.png
WP Metro Icon WP8.png
SignpostIcon WP7 70px.png
Article Metadata
Code ExampleTested with
SDK: Windows Phone SDK 8.0, Windows Phone SDK 7.1
Devices(s): Nokia Lumia 820, Lumia 920
Platform(s): Windows Phone 8.0/ 7.1
Windows Phone 8
Windows Phone 7.5
Keywords: TextBox, Suggestion Box
Created: somnathbanik (30 Oct 2011)
Last edited: hamishwillee (02 Jul 2013)


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.

Suggestion Text Box WP7


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.

Source Code

The full source code of the example is available here:

This page was last modified on 2 July 2013, at 06:13.
186 page views in the last 30 days.