作者:猪猪寂寞的王子_125 | 来源:互联网 | 2023-01-21 15:56
SinceMicrosoftdoesntallowtoreplacethesystemsvirtualkeyboard,Ivedevelopedacustomvirt
Since Microsoft doesn't allow to replace the system's virtual keyboard, I've developed a custom virtual keyboard as a UserControl
to be used inside my Windows Store App. My current problem is that the default virtual keyboard always pops up whenever a user taps a TextBox
.
由于微软不允许替换系统的虚拟键盘,我开发了一个自定义虚拟键盘作为用户控件,可以在我的Windows Store应用程序中使用。
I've been searching for a solution to this problem since yesterday, but I couldn't solve it. My almost successful attempt was developing a TextBox
with a transparent Canvas
over it. When the user taps the Canvas
, the focus is programatically transferred to the TextBox
and my custom virtual keyboard is instantiated. However, if no physical keyboard is connected to the tablet, the system keyboard also pops up with this approach (over my custom keyboard).
从昨天起我一直在寻找解决这个问题的办法,但是我没有办法。我几乎成功的尝试是开发一个带有透明画布的文本框。当用户轻击画布时,焦点被程序化地转移到文本框中,我的自定义虚拟键盘被实例化。然而,如果没有物理键盘连接到平板电脑上,系统键盘也会弹出这种方式(通过我的自定义键盘)。
The main reason why I want to use a TextBox
is because that way I can preserve and use the already implemented caret function, but it is not mandatory.
我想使用文本框的主要原因是,这样我可以保存和使用已经实现的插入符号函数,但它不是强制性的。
Any input will be helpful, thanks.
任何意见都可以,谢谢。
1 个解决方案