Splash Screen Solution for Drop 9

Topics: Prism v2 - WPF 3.5
Feb 19, 2009 at 10:47 AM
Hi All,
   Anyone has a solution for splash screen display before loading the module especially for Prism v2 Drop 9. I foound few articles based on the prism v1. I dont find the IModuleLoader in Prism v2 drop 9.
Feb 19, 2009 at 12:03 PM
I haven't looked at this yet but have it bookmarked for when I've met core requirements


Feb 19, 2009 at 12:10 PM
Hi Bill,
   Thank you for the reply. Actually i am looking for WPF application not for silverlight. I can see code which inherit from IModuleLoader and add a event to the module loader before the module loads and handle the events http://blog.hightech.ir/2008/10/splash-screen-with-prism.html. But in Prism v2 Drop 9 how do we do that? Is there any in built functionality to do the asynchronous splash screen in prism v2?
Feb 19, 2009 at 12:20 PM
Edited Feb 19, 2009 at 12:35 PM
In that case it is extremely easy using one of Visual Studio's best kept secrets for WPF applications!

  1. Add your image to your WPF application.
  2. Right Click on the image and select Properties
  3. Change the "Build Action" in properties to "SplashScreen"

Walla!  You have a splash screen :)

Feb 19, 2009 at 12:26 PM
Edited Feb 19, 2009 at 12:27 PM
In case you don't have Visual Studio...  I provide the auto-generated code below - see static void Main()

Note: If in your Visual Studio application - you have your App.xaml's Build Action (Properties) set to "ApplicationDefinition" an App.g.cs file will be auto-generated for you in the hidden obj\debug\ folder.  If we have to apply attributes to Main then we have to turn this off (switch to Compile) and manually manage the App.g.cs file.

using System.Windows.Markup;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Effects;
using System.Windows.Media.Imaging;
using System.Windows.Media.Media3D;
using System.Windows.Media.TextFormatting;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace StreetDocDesktop {
    /// <summary>
    /// App
    /// </summary>
    public partial class App : System.Windows.Application {
        /// <summary>
        /// InitializeComponent
        /// </summary>
        public void InitializeComponent() {
            #line 4 "..\..\App.xaml"
            this.StartupUri = new System.Uri("Window1.xaml", System.UriKind.Relative);
            #line default
            #line hidden
        /// <summary>
        /// Application Entry Point.
        /// </summary>
        public static void Main() {
            SplashScreen splashScreen = new SplashScreen("streetdoclogo.jpg");
            StreetDocDesktop.App app = new StreetDocDesktop.App();

Feb 19, 2009 at 12:51 PM
Hi Bill,
   thank you for the post, but i am using the composite application library to load as a module. Shell will have the container which in turn loads the Module using the Module Manager. So my question is whether Splash Screen will be a Shell or Module. If it is a Shell then i should have a 2 shell one for splash screen and another for Main Module. If it is a module then i dont know how to load asynchronous.
Feb 19, 2009 at 1:20 PM
Sorry, I don't have a solution for your requirement then...  My next two sprints are for Mobile and Website so it may be a while before I encounter a requirement that puts me in a position where I'll need to address this.  Please be sure to post your solution here when you get it figured out!! 
Feb 20, 2009 at 11:05 PM
What I would do is something like this:

private YourSplashScreensplash;
private YourShell shell;

Override void CreateShell()
    // Create the shell but DONT SHOW IT YET!
    this.shell = new YourCustomShell();

    // Create the splash and show it
    this.splash = new YourSplashScreen();

    // Return the shell as usual. This will hook up the correct regionmanager, but it will be hidden.
    return this.shell;


Override void InitializeModules()
    // Load all modules (only the background modules (that will be downloaded async) will not be ready.. but you WANT those to be downloaded on a background thread.

    // Hide and unload the splash screen.
    this.splash = null;

    // Show the shell
Feb 22, 2009 at 4:41 PM
Edited Feb 22, 2009 at 4:43 PM
I’m using billkrat’s approach to show a splash screen in my project www.codeplex.com/CompositeExtensions. Unfortunately, the splash screen doesn’t stay on top. It is shown at startup then it hides for some seconds and comes back again. That’s not what I expect from a splash screen.

Anyone an idea to keep the splash screen on top?
Sep 28, 2010 at 7:16 PM

I'm experiencing the same thing as the previous poster, where the splash screen "hides" for a few seconds and comes back. does anyone know a solution for this?

Sep 28, 2010 at 8:27 PM


There is no guidance on this topic in Prism out-of-the-box. I do not know your exact scenario, but you could try something similar to the vallekie's approach, since it seems to use Prism. If you continue experiencing this problem, could you please send a repro sample?

Additionally, if you have more question related to WPF or Silverlight, you could also use the following forums:

Fernando Antivero