I've stumbled upon an oddity and figured I'd mention it in case someone at MS would like to perhaps do something about it. In another thread, I've discussed a problem occuring if the Application constructor invokes MessageBox.Show. I worked around that by
deferring showing the dialog box until the construction of the app's main window.
Now I have added a splash screen, and weird things began to happen: The splash screen displays, then the dialog box appears (with an important warning and giving the user two options to choose from - one allowing the app to run, but resulting in loss of
data!), and then both the splash screen and the dialog box disappears! The dialog box had OK and Cancel buttons, and apparently the splash screen decided it was OK to run and lose data, because my code ran exactly as if the user had in fact clicked OK!
This isn't really an issue for me now, as I don't really need the splash screen at all. But it sure could be an issue for someone, so I figured I'd put it "on the record".
Create a new WPF app In the MainWindow constructor, invoke MessageBox.Show Add an image file to the project, and set it's build action to SplashScreen Run and behold the strangeness unfold!
If you need further convincing, set the image's build action to None and run again, to confirm for yourself that the dialog box now behaves as one would
View Complete Post