无法与InputPane交互 [英] Unable to interact with InputPane
问题描述
如果我在覆盆子pi3上的win10 iot安装上执行以下代码行,它将无效。 OS-OSK已启用,如果选择了文本框,则会正确弹出。
If I execute the following line of code on a win10 iot installation on a raspberry pi3, it won't work. OS-OSK is enabled and does properly pop up if a textbox is selected.
var pane = InputPane.GetForCurrentView();
try {
var x = pane.Visible;
} catch (Exception ex) {
Debug.Print(ex);
}
此代码抛出"无法将类型为"Windows.UI.ViewManagement.InputPane"的对象强制转换为"Windows.UI.ViewManagement.IInputPaneControl""并退出。
窗格引用也完全无法使用 - TryShow / TryHide不起作用,Visible抛出异常,OverlappedRegion全部为零。即使OSK正常弹出,也不会调用事件。而InputScope也不起作用,但这可能与
有限的功能有关。
我目前正在使用 v。 10.0.16299.248
并使用.NET Core for UWP 6.0.7
Any与OS-OSK交互的其他方式?
推荐答案
Hello CShark _,
Hello CShark_,
我转载了你的问题在Raspberry Pi3上。
I reproduced your issue on Raspberry Pi3.
来自
输入法文档,它说:
有效 property 仅适用于Xbox设备系列。 通用应用应该使用 OccludedRect property ,
而不是Visible。
Valid property for Xbox device family only. Universal apps should use OccludedRectproperty, rather than Visible.
对于Windows 10 Creators秋季更新和更新,我们推荐使用以下API来处理停靠,未停靠,可移动和暂时性输入窗格的遮挡,例如软输入面板(SIP),输入法编辑器
(IME)候选窗口,浮动工具栏等等。
- CoreInputView
- CoreInputViewOcclusion
- < span style ="text-decoration:underline"> CoreInputViewOcclusionKind
祝你好运,
Rita
这篇关于无法与InputPane交互的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!