我想在点击Enter键时隐藏软键盘,但没有适合我的解决方案. (
Windows Phone 8.1通用应用程序)
这个只是不起作用:
if (e.Key == VirtualKey.Enter) { textBox.IsEnabled = false; textBox.IsEnabled = true; }
像这样的方法:
private void LoseFocus(object sender) { var control = sender as Control; var isTabStop = control.IsTabStop; control.IsEnabled = false; control.IsTabStop = false; control.IsEnabled = true; control.IsTabStop = isTabStop; }