简体   繁体   English

焦点在Windows Store应用中不起作用

[英]Focus does not work in Windows Store apps

I am developing a Windows Store app in C#/XAML. 我正在用C#/ XAML开发Windows应用商店应用。 I have couple of TextBoxes and one more button in my page. 我的页面上有几个TextBoxes和一个按钮。 While clicking the button i start the progress indicator and moving to next page. 单击按钮时,我启动进度指示器并移至下一页。

In my case, once progress ring started its transition. 就我而言,一旦进度环开始过渡。 Focus automatically going to my textbox and it enables Keypad in the bottom even though i did not set any focus to the TextBox. 焦点自动转到我的文本框,即使我没有将任何焦点设置到TextBox,它也会在底部启用键盘。 Once progress started in the ring, i tried to set the focus for the Page. 一旦进展顺利,我就尝试为Page设置焦点。 But it did not do the trick. 但这并不能解决问题。

Is there any way to disable this?. 有什么方法可以禁用此功能吗? It is annoying to the user and blocks the UI in the Tablet. 这很讨厌用户,并在平板电脑中阻止了UI。 Could you please any one help me on this ? 可以请任何人帮我吗?

Before starting the ProgressRing remove from tab navigation all controls that enables the keypad 在启动ProgressRing之前,从选项卡导航中删除所有启用键盘的控件

private void Button_Click_1(object sender, RoutedEventArgs e)
{
    // First remove your TextBox (or all of them) from tab navitaion
    MyTextBox.IsTabStop = false;
    // Now you can start the ProgressRing
    MyProgressRing.IsActive = true;
}

If you need you can include again the controls in tab navigation after stop the ProgressRing 如果需要,可以在停止ProgressRing之后再次在选项卡导航中包含控件

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

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