Keyboard won't dismiss even after Focus change

后端 未结 5 1916
忘掉有多难
忘掉有多难 2020-12-19 06:05

I am creating a Windows 8.1 app and after the user presses a button, a popup opens over most of the screen. There are several textboxes inside the popover.

I found

5条回答
  •  渐次进展
    2020-12-19 06:14

    It was impossible to programmatically manage the touch-keyboard's appearance and disappearance. Unfortunately, changing the IsEnabled property didn't work for me.

    The touch-keyboard appearance principle was known as Focus-driven, but I had walked out by setting the property IsTabStop=True on the UserControl explicitly. Besides, the TextBox won't activate the touch-keyboard if its IsTabStop=false.

    In theory, I think the system searches the next potential TextBox, so that if so it wasn't to close and re-open, with touchable+inputable property. Maybe there were kind of bug that while releasing the Focus, current TextBox releases only his "touchable" focus, and didn't finish to release the keyboard's "inputable" focus, because that by default only the input-controls have Tab-Stoppable property.

    By the way, if we close the UserControl by a CustomControl's Close button, the IsTabStop=true will be needed on his parent.

    PS: Solution tested only on Windows 8.1 Store Application.

提交回复
热议问题