×
Namespaces

Variants
Actions

Enabling predictive text in a TextBox in Windows Phone

From Nokia Developer 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
Compatibility
Platform(s): Windows Phone 8.0/ 7.1
Windows Phone 8
Windows Phone 7.5
Article
Keywords: TextBox, Suggestion Box
Created: somnathbanik (30 Oct 2011)
Last edited: hamishwillee (02 Jul 2013)

Introduction

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

Implementation

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: File:SuggestionBoxWP7.zip

This page was last modified on 2 July 2013, at 09:13.
219 page views in the last 30 days.
×