简体   繁体   English

在焦点事件上打开触摸键盘窗口10 通用应用

[英]Open touch keyboard windows 10 on focus event TextBox | Universal App

i've a problem. 我有问题。 I wanted a method to open touch keyboard on windows when the user click on TextBox on the wpf client. 我想要一种在用户单击wpf客户端上的TextBox时在Windows上打开触摸键盘的方法。

So i've found this: 所以我发现了这个:

System.Diagnostics.Process.Start("TabTip.exe");

But I don't have a Process library on Windows universal app. 但是我在Windows通用应用程序上没有进程库。 My target is open automatically the keyboard when the textbox or text input is focused. 当文本框或文本输入聚焦时,我的目标自动打开键盘。

There is a solution for do this ? 有解决方案吗? From C# code or WPF? 从C#代码还是WPF? exist a solution ? 是否存在解决方案?

My question it's not a duplicate of this , because i wanted to open/close automatically a touch keyboard every time a text input has focused. 我的问题是不是重复这个 ,因为我想自动关闭每一个文本输入集中时间开/触控式键盘。

Thanks 谢谢

The title of your question makes it unclear, if your are asking about WPF or UWP. 如果您要询问有关WPF或UWP的问题,则标题的标题不清楚。 It works by default in UWP when your app is launched on touch device. 当您的应用程序在触摸设备上启动时,它默认在UWP中工作。 On WPF its a little bit different. WPF略有不同。 Lately, MS changes this behavior very often. 最近,MS经常更改此行为。 Currently, this works in WPF by default on touch device, but only if your Window does not have WindowsStyle property set to None . 当前,默认情况下,此功能在WPF上可在触摸设备上使用,但前提是您的Window的WindowsStyle属性None设置为None

Edit: In UWP it works by default, but you have to bo on touch device. 编辑:默认情况下,它在UWP中工作,但是您必须在触摸设备上启动。 If you run your app in simulator, make sure you use touch mode. 如果您在模拟器中运行应用,请确保使用触摸模式。 在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM