带有触摸的Windows 7上的WPF:隐藏软键盘(以及启用它的弹出图标) [英] WPF on Windows 7 with touch: hide soft keyboard (and the popup icon that enables it)

查看:518
本文介绍了带有触摸的Windows 7上的WPF:隐藏软键盘(以及启用它的弹出图标)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个WPF应用程序,由于硬件限制,该应用程序必须在Windows 7 Standard Embedded上运行.该设备启用了触摸功能,在构建应用程序的过程中我会充分利用它.

I have a WPF application that, due to hardware constraints, has to run on Windows 7 Standard Embedded. The device is touch enabled and I am taking advantage of that in the way that I am building the application.

但是,我遇到的一个问题是,当我使用TextBox控件(说实话,这种情况并不常见)时,当该控件具有允许打开屏幕键盘的焦点时,会向用户显示一个图标-图标由WPF和/或操作系统提供,而不是我自己做的事情.

One problem I have however is that when I use a TextBox control (which to be honest is not very often) the user is presented with an icon when the control has focus that allows the opening of an on-screen keyboard - this icon being provided by WPF and/or the OS, not something that I am doing myself.

我希望能够在单个表单级别或在单个控件级别禁用此图标和相关的键盘,但是所有搜索都返回结果,并假设我想尝试启用这种功能和/或复制它.

I would like to be able to disable this icon and the associated keyboard either at an individual form level or at an individual control level but all searches return results assuming that I want to try and enable such functionality and/or replicate it.

有人可以建议我如何在WPF应用程序中控制屏幕键盘上Windows 7的可用性,以使我确实可以禁用它吗?

Can anybody please advise as to how I can control the availability of the Windows 7 on screen keyboard within a WPF application so that I can indeed disable it?

我还应该指出,当前的硬件限制排除了升级到Windows 8、8.1或10的任何选项,因此请不要在可能的任何答案中都考虑到这一点.

I should also point out that the hardware constraints currently rule out any option of upgrading to Windows 8, 8.1 or 10 so please do not consider this in any answer you may have.

谢谢.

推荐答案

要禁用文本框的屏幕键盘图标,请在Xaml中将其设置为InputMethod.IsInputMethodEnabled ="False".

To disable the on screen keyboard icon for a TextBox, set InputMethod.IsInputMethodEnabled="False" against it in the Xaml.

尚未在其他任何级别进行测试,但这解决了我的问题.

Have not yet tested at any other level, but this solved my problem.

这篇关于带有触摸的Windows 7上的WPF:隐藏软键盘(以及启用它的弹出图标)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆