如何有效地隐藏的Windows Phone 8.1的软键盘? [英] How to hide Windows Phone 8.1 soft keyboard effectively?

查看:143
本文介绍了如何有效地隐藏的Windows Phone 8.1的软键盘?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想隐藏软键盘时,<大骨节病>输入键被窃听,但没有妥善的解决方案为我工作。 (Windows Phone的8.1通用的应用程序)

I want to hide the soft keyboard when the Enter key is tapped, but no solutions works for me properly. (Windows Phone 8.1 Universal App)

这一次是行不通的:

if (e.Key == VirtualKey.Enter)
{
    textBox.IsEnabled = false;
    textBox.IsEnabled = true;
}



像这样的方法:

A method like this:

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;
}



仅部分。只有当我使用文本框首次隐藏键盘。 。在第二次键盘再现

works only partially. It's hiding keyboard only when I'm using textbox for the first time. On the second time keyboard is reappearing.

推荐答案

我只是做了类似的东西,它的工作:

I just did something like that and it's working:

private async void makeRequest(string title, int page)
    {
        myTextBox.IsEnabled = false;
        myTextBox.IsTabStop = false;
        // here is my httprequest and changing itemssource of listview
        myTextBox.IsEnabled = true;
        myTextBox.IsTabStop = true;
    }

这篇关于如何有效地隐藏的Windows Phone 8.1的软键盘?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆