Namespaces
Variants
Actions

在WP7平台上创建suggestion box

Jump to: navigation, search
文章信息

代码示例
文章
翻译:
最后由 hamishwillee 在 30 Nov 2012 编辑


这篇文章演示了如何在WP7上创建拥有自动提示功能的文本框。

简介

在Windows Phone 7上有一个内嵌的文字预测功能,当用户在 TextBox中输入信息时,它会出现提示列表来预测用户下一个可能要输入的文字。为了使 TextBox具备这种功能,我们需要将InputScope设置成Text 或者Chat。

Suggestion Text Box WP7

基本思路

我们创建一个空的程序,并在xaml文件中添加一个TextBox。将TextBox的InputScope属性设置为Text 或者Chat。

<TextBox InputScope="Text"/>

现在当用户在TextBox中输入文字时,在键盘上就会显示出出现建议列表。

源代码

完整的源代码在这里: File:SuggestionBoxWP7.zip

This page was last modified on 30 November 2012, at 08:30.
107 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved