简体   繁体   English

消息框所有权设置

[英]Message Box OwnerShip setting

I am a noobie to WPF, I have created a chat application and now I need to show message boxes like this but what is my issue is when the user clicks out of my application, application goes to the background but opened popup is open on the foreground like this我是 WPF 的新手,我创建了一个聊天应用程序,现在我需要显示这样的消息框,但我的问题是当用户单击我的应用程序时,应用程序进入后台但打开的弹出窗口在像这样的前景

code used is::使用的代码是::

 if (string.IsNullOrEmpty(EmailId))
 {
    BusyIndication = Visibility.Hidden;
    CustomMessageBox.Show("Email ID should not be empty", "Email ID", MessageBoxButton.OK);
    LoginView.SignInButton.IsEnabled = true;
 }

I think that I need to set ownership property but don't know how to do it.我认为我需要设置所有权属性但不知道该怎么做。

Any suggestion??有什么建议吗??

Take your pick:随你选:

Show(Window owner, string messageBoxText);
Show(Window owner, string messageBoxText, string caption);
Show(Window owner, string messageBoxText, string caption, MessageBoxButton button);
Show(Window owner, string messageBoxText, string caption, MessageBoxButton button, MessageBoxImage icon);
Show(Window owner, string messageBoxText, string caption, MessageBoxButton button, MessageBoxImage icon, MessageBoxResult defaultResult);
Show(Window owner, string messageBoxText, string caption, MessageBoxButton button, MessageBoxImage icon, MessageBoxResult defaultResult, MessageBoxOptions options);

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

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