繁体   English   中英

如何确定WP7 SIP键盘何时被解除

[英]How to determine when the WP7 SIP keyboard has been dismissed

我注意到,当显示SIP键盘时,当用户通过WP7后退按钮关闭键盘时,不会触发OnBackKeyPress事件。

有没有办法让我通过后退按钮确定键盘何时被解除?

谢谢

您可以处理文本框的KeyUp事件,然后检查PlatformKeyCode

 <TextBox Text="TextBox" Width="460" KeyUp="Textbox_KeyUp" />

然后,在您的事件处理程序中:

private void Textbox_KeyUp(object sender, KeyEventArgs e)
{
     //27 is the PKC for the hardware back button
     if (e.PlatformKeyCode == 27)
     {
         //Backbutton is pressed
     }            
}

检查TextBox上的LostFocus事件。 也许它可能适合你(但当用户点击TextBox之外它也会触发)

暂无
暂无

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

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