ContentDialog不会在丢失焦点时退出 [英] ContentDialog Doesnnt Exit on Lost Focus

查看:74
本文介绍了ContentDialog不会在丢失焦点时退出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 private void locationUpdateDialog_LostFocus(object sender, RoutedEventArgs e)
        {
            locationUpdateDialog.Visibility = Visibility.Collapsed;
        }




locationUpdateDialog是一个内容对话框。但是一旦失去焦点,它就不会像以前那样关闭。


locationUpdateDialog is a Content Dialog.However upon loosing focus it is not closed as should have happened.

推荐答案

什么类型的应用程序?请按照
发布指南:主题行标签

您的LostFocus事件是否被调用?

Is your LostFocus event getting called?

ContentDialog是否首先集中注意力?是否失去焦点?

Is the ContentDialog getting focused in the first place? Is it losing focus?

这可能不是您想要的代码,因为您可能希望对焦在对话框上的控件之间移动时保持打开状态。

This probably isn't the code you want, since you probably want the dialog to stay open while the focus moves between controls on the dialog.

根据应用和设备的类型以及ContentDialog的设计方式,重点可能无处可去。 ContentDialogs通常是全屏的。

Depending on the type of app and device and how your ContentDialog is designed there may not be anywhere else for the focus to go. ContentDialogs are often full screen.


这篇关于ContentDialog不会在丢失焦点时退出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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