Windows Dev Center

SplashScreen class

Provides a dismissal event and image location information for the app's splash screen.


/* For information about creating or accessing this object, see Remarks. */


The SplashScreen class has these types of members:


The SplashScreen class has these events.

Dismissed Fires when the app's splash screen is dismissed.



The SplashScreen class has these properties.

PropertyAccess typeDescription


Read-onlyThe coordinates of the app's splash screen image relative to the window.



Access this object from your app's activated event handler by using the SplashScreen property on the event object that is passed into your handler.

For JavaScript

Respond to onactivated events in your activated event handler. To learn how to respond to activated events, see App lifecycle.

If you notice a flicker during the transition to your extended splash screen, add onload="" on your <img> tag like this: <img id="extendedSplashImage" src="/images/splash-sdk.png" alt="Splash screen image" onload="" />. This helps prevent flickering by making the system wait until your image has been rendered before it switches to your extended splash screen.

Additionally, if you use fragment loading to load an extended splash screen page, you may still notice a flicker between when the Windows splash screen is dismissed and when your page is displayed. You see this flicker because fragment loading begins to load your imitation splash screen page asynchronously, before the onactivated event handler finishes executing. You can prevent this unsightly flicker by avoiding the use of fragment loading to load your extended splash screen page (as demonstrated by the Splash screen sample). When your additional loading tasks are complete (also as demonstrated by the Splash screen sample) you can then navigate to your app’s main page. Alternatively, if you wish to continue the use of fragment loading in your extended splash screen page, you can also prevent the flicker by getting an activation deferral and responding to onactivated events asynchronously. Get a deferral for an activated event by calling the activatedOperation.getDeferral method.

For C#/C++/VB

Respond to Activated events by overloading the corresponding activated event handler method. For example, use OnLaunched to respond to ActivationKind.Launch activation events. To learn how to respond to activated events, see App lifecycle.

If you notice a flicker during the transition to your extended splash screen, see the Troubleshooting section in Guidelines and checklist for splash screens for help.

The SplashScreen property is available on all Windows.ApplicationModel.Activation classes.


The Splash screen sample demonstrates how to retrieve a SplashScreen object in its activated event handler, when the app launches.

function activated(eventObject) {
    if (eventObject.detail.kind === Windows.ApplicationModel.Activation.ActivationKind.launch) {
        // Retrieve splash screen object
        splash = eventObject.detail.splashScreen;

        // Retrieve the window coordinates of the splash screen image.
        SdkSample.coordinates = splash.imageLocation;

        // Register an event handler to be executed when the splash screen has been dismissed.
        splash.addEventListener("dismissed", onSplashScreenDismissed, false);

        // Create and display the extended splash screen using the splash screen object.;

        // Listen for window resize events to reposition the extended splash screen image accordingly.
        // This is important to ensure that the extended splash screen is formatted properly in response to snapping, unsnapping, rotation, etc...
        window.addEventListener("resize", onResize, false);

        // Use setPromise to indicate to the system that the splash screen must not be torn down
        // until after processAll and navigate complete asynchronously.
        eventObject.setPromise(WinJS.UI.processAll().then(function () {
            // Navigate to either the first scenario or to the last running scenario
            // before suspension or termination.
            var url = WinJS.Application.sessionState.lastUrl || scenarios[0].url;
            return WinJS.Navigation.navigate(url);

// Register your activated event handler
WinJS.Application.addEventListener("activated", activated, false);

You can use the object passed to your activated event handler to get information about the activated event. In the example, the object contains information about a launch activation and is either a webUILaunchActivatedEventArgs (JavaScript) or a LaunchActivatedEventArgs (C#/C++/VB) object, depending on the programming language. The Kind property on this object lets you distinguish between different types of activation (like ActivationKind.launch or

Requirements (Windows 10 device family)

Device family


API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0


Windows::ApplicationModel::Activation [C++]



Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

Windows Phone 8


Windows::ApplicationModel::Activation [C++]





See also

Windows.ApplicationModel.Activation classes
Splash screen sample
App activate and suspend using WinJS sample
App activated, resume, and suspend using the WRL sample
Quickstart: Adding a splash screen
App lifecycle
How to extend the splash screen
Add a splash screen
App lifecycle
Display a splash screen for more time



© 2015 Microsoft