Namespaces

Variants
Actions

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.

在WP7平台上创建suggestion box

From Wiki
Jump to: navigation, search
WP Metro Icon UI.png
SignpostIcon WP7 70px.png
Article Metadata

代码示例
兼容于
文章
翻译:
WS_YiLunLuo
最后由 hamishwillee 在 03 Jul 2013 编辑


这篇文章演示了如何在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 3 July 2013, at 03:50.
186 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×