是否可以在Windows Phone 8.1 RT TextBox中禁用滑动键盘

时间:2015-02-23 16:43:45

标签: windows-phone-8 winrt-xaml

是否可以像在PasswordBox中一样禁用TextBox中的滑动键盘。

3 个答案:

答案 0 :(得分:1)

找到了解决方法。

添加文本框(并删除其中的文字) Add a textbox (and delete the text in it) 在文本框中添加密码框 Add a passwordbox on the textbox 将密码箱不透明度设置为0% Set the passwordboxes opacity to 0% 在密码框上创建一个passwordchanged触发器(双击密码框也是如此)并编写一个代码,将文本框的文本设置为密码框密码(在此之前将名称添加到密码框和文本框中) Make a passwordchanged trigger on The passwordbox (double click on passwordbox does the same) and write a code that sets the text of The textbox to The passwordboxes password (add names to passwordbox and textbox before this) 你必须完成! 我希望我能帮助你。

答案 1 :(得分:1)

不一定是最好的解决方案,但使用InputScope可能会得到你想要的。例如,这不允许使用形状写入键盘:

<TextBox InputScope="NameOrPhoneNumber"/>

可以找到可能的InputScope值列表here。 [编辑:更新了XAML]

答案 2 :(得分:0)

我认为在textBox中禁用滑动键盘是不可能的,但您可以在手机设置中禁用它(设置 - &gt;键盘 - &gt;点按键盘语言 - &gt;取消选中&#34;键入我刷卡通过信件&#34;)。