You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the WPF project with a SplashScreen, the first MessageBox.Show in the App's OnStartup method always fails (the display disappears for 0.3 seconds or so and returns No, which does not block the thread).
No matter how long it sleeps before that, It always fails the first time.
publicpartialclassApp{privatevoidOnStartup(objectsender,StartupEventArgse){
System.Threading.Thread.Sleep(15000);// No matter how long or 0, The SplashScreen stays displayed when sleeping//At this point the startup image starts to fade and disappearvarresult= System.Windows.MessageBox.Show("The first use always automatically disappears and returns No");
Debug.WriteLine($"The first use always returns no test: {result}");varresult2= System.Windows.MessageBox.Show("Subsequent normal use test, click OK to close");
Debug.WriteLine($"Subsequent normal use test: {result2}");varresult3= System.Windows.MessageBox.Show("Subsequent normal use test, click OK to close");
Debug.WriteLine($"Subsequent normal use test: {result3}");
System.Windows.MessageBox.Show("Blocking for log replication");}}
New WPF Project with .NET 8.0 Using OnStartup in App.xaml
Expected behavior
The first messagebox should block the threads
Actual behavior
In the WPF project with a SplashScreen, the first MessageBox.Show in the App's OnStartup method always fails (the display disappears for 0.3 seconds or so and returns No, which does not block the thread). This does not convey interactive information
Regression?
.NET CORE3.1 does not have a SplashScreen.
Known Workarounds
No response
Impact
No response
Configuration
No response
Other information
No response
The text was updated successfully, but these errors were encountered:
Description
In the WPF project with a SplashScreen, the first MessageBox.Show in the App's OnStartup method always fails (the display disappears for 0.3 seconds or so and returns No, which does not block the thread).
No matter how long it sleeps before that, It always fails the first time.
debugging log:
Reproduction Steps
New WPF Project with .NET 8.0 Using OnStartup in App.xaml
Expected behavior
The first messagebox should block the threads
Actual behavior
In the WPF project with a SplashScreen, the first MessageBox.Show in the App's OnStartup method always fails (the display disappears for 0.3 seconds or so and returns No, which does not block the thread). This does not convey interactive information
Regression?
.NET CORE3.1 does not have a SplashScreen.
Known Workarounds
No response
Impact
No response
Configuration
No response
Other information
No response
The text was updated successfully, but these errors were encountered: