加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

windows-phone-7 – 以编程方式在WP7上显示软输入面板(SIP)

发布时间:2020-12-14 02:55:33 所属栏目:Windows 来源:网络整理
导读:如何通过代码以编程方式显示软输入面板(SIP)/键盘. (我没有可以指定InputScope的文本框). 解决方法 从 Jeff Blankenburgs 31 Days of Windows Phone 7开始: Sometimes,you want to get keyboard input from your user,even when you don’t want to present
如何通过代码以编程方式显示软输入面板(SIP)/键盘. (我没有可以指定InputScope的文本框).

解决方法

从 Jeff Blankenburgs 31 Days of Windows Phone 7开始:

Sometimes,you want to get keyboard
input from your user,even when you
don’t want to present them with an
actual TextBox. There’s probably
plenty of ways around this,but I’ve
been using a handy one that is simple
to accomplish. (If you’re searching
for a reason to do this,think of a
game of Hangman. I don’t want the
keyboard visible always,but I also
don’t want a TextBox on the screen.)

Put a button on your page.

Put a TextBox on your page,but make sure it’s hidden from the user’s view.

Either position it off screen,make it completely transparent (and in the absolute background),or some other method that allows it to get added to your visual tree,but doesn’t let the user see it.

Set an event handler on your button that sets Focus() to the hidden textbox when it’s clicked.

That’s it! This will allow you to show the keyboard without the user seeing a textbox.seeing a textbox.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读