wpfsplash-screen

WPF application window appears on top of SplashScreen


I followed the simple steps outlined at How to: Add a Splash Screen to a WPF Application to add a splash screen to my WPF application. When I start the application, the splash image is shown, then the main window pops up, and the splash image fades away.

My problem is that when the main window pops up, it appears on top of the splash image. Then when the splash image begins to fade out, the splash image pops up to the top again. The end result is that the splash image disappears for a split second as the main window appears.

How can I force the main window to appear under the splash image, so that the splash image does not disappear?


Solution

  • This isn't default behaviour you must have some code thats manually focusing the main window?

    It may be easier just to turn off the fade manually with a bit of code like this:

    _splash = new SplashScreen("LoadingScreen.png");`
    _splash.Show(false);`
    _splash.Close(TimeSpan.Zero); `