假设我们有下面的代码:用SplashScreen显示的WPF MessageBox的非模态行为 - bug?
void App_Startup(object sender, StartupEventArgs args)
{
MessageBox.Show("something");
}
被称为当应用程序启动:
<Application x:Class="AppClass.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Startup="App_Startup"
StartupUri="MainWindow.xaml">
<Application.Resources>
</Application.Resources>
</Application>
当我不SplashScreen
运行它,它运行正常(即等待点击OK
)但是当与SplashScreen
一起运行时,消息框会与SplashScreen
一起消失。
这是正常行为还是错误?
*这是一个正常的行为或错误?* ...我们如何回答,除非你显示如何打开你的启动画面? – Sheridan 2014-09-03 16:22:16
你如何显示启动画面?通过设置图像属性? – Kurubaran 2014-09-03 16:22:35
通过VS添加普通.jpg并将'Build Action'设置为'SplashScreen'。然后通过Ctrl + F5运行代码 – user2341923 2014-09-03 16:24:45