惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google DeepMind News
Google DeepMind News
F
Fortinet All Blogs
量子位
G
Google Developers Blog
J
Java Code Geeks
N
Netflix TechBlog - Medium
博客园 - 聂微东
宝玉的分享
宝玉的分享
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
月光博客
月光博客
The Cloudflare Blog
Apple Machine Learning Research
Apple Machine Learning Research
爱范儿
爱范儿
雷峰网
雷峰网
M
MIT News - Artificial intelligence
T
Tailwind CSS Blog
V
Visual Studio Blog
阮一峰的网络日志
阮一峰的网络日志
博客园 - 三生石上(FineUI控件)
Microsoft Azure Blog
Microsoft Azure Blog
aimingoo的专栏
aimingoo的专栏
Martin Fowler
Martin Fowler
有赞技术团队
有赞技术团队
T
The Blog of Author Tim Ferriss

博客园 - 阳光追梦

Xamarin Android ListView 控件使用 Xamarin Android -创建Splash Screen (一) Web Api 2 接口API文档美化 高仿Windows Phone QQ登录界面 Windows Phone 8 显示当前项目的使用内存,最大峰值,最大内存上限 Windows Phone 8 下载文件进度 Windows Phone 8 开发资料 jquery 选择器大全 转载:SQL 递归树 子父节点相互查询 Silverlight 代水印的查询文本框 Style Create a Settings Page for Windows phone Android 4.1 新增UI模板 Winwdos Phone 从手机中读取相册图片 windows phone 7 学习笔记 五 TileSample windows phone 学习笔记 四 2011 西安世界园艺博览会-----Silverlight 电子地图上线 Linq 读取简单的XML数据 Esri for Window Phone 7(一) 加载BingMap Windows Phone 7 学习笔记------常用工具(二)
Windows Phone 7 学习笔记三------文本框输入作用域
阳光追梦 · 2011-05-04 · via 博客园 - 阳光追梦

      WP7 对于在输入的时候可以设置文本框的输入作用域。也就是说,在对于文本输入的时可以设置不能的键盘。比如:设置数字时,只调用数字键盘出来,电子邮件也如此。由于目前在对文本框设置作用域时,没有智能提示,只能查询API了,可能这是WP7 这个版本的问题了。

1、只能对数据输入时用

<TextBlock Text="your number" Style="{StaticResourcePhoneTextLargeStyle}" />
<
TextBox InputScope="Number" Name="txtNumber"Height="71"Width="460" />

2、输入个人名称及信息

  <TextBlock Text="your name" Style="{StaticResource PhoneTextLargeStyle}" />
<
TextBox InputScope="PersonalFullName" Name="txtName" Height="71" Width="460" />

3、输入地址信息

<TextBlock Text="what country are you from?" Style="{StaticResourcePhoneTextLargeStyle}" />
<
TextBox InputScope="AddressCountryName" Name="txtCountry"Height="71"Width="460" />

4、电子邮件

<TextBlock Text="your email" Style="{StaticResource PhoneTextLargeStyle}" />
<
TextBox InputScope="EmailNameOrAddress" Name="txtEmail" Height="71" Width="460" />

5、URL

<TextBlockText="your favorite website" Style="{StaticResourcePhoneTextLargeStyle}" />
<
TextBox InputScope="Url" Name="txtWebsite"Height="71"Width="460" />

6、电话号码

<TextBlockText="call your best friend" Style="{StaticResourcePhoneTextLargeStyle}" />
<
TextBox InputScope="TelephoneNumber" Name="txtFriend"Height="71"Width="460" />

其归纳起来就六个枚举型

枚举值

说明

Number 调用输入数字键盘
PersonalFullName 调用字母键盘
AddressCountryName 调用字母键盘
EmailNameOrAddress 调用有@,.COM的键盘
Url 调用有www,http.键盘
TelephoneNumber 调用数字键盘