Skip to content
Philip Colmer edited this page Nov 5, 2016 · 2 revisions

By default, apps have a very limited time to start presenting a user interface before Windows decides that the app is not working properly and terminates it. If an app needs more time to get started, the solution is to use an extended splash screen. This can present anything the developer wants to show to the user while the app finishes the startup phase, after which the user interface is then displayed.

Template 10 makes the process simpler by providing a mechanism to display the extended splash screen at the appropriate point.

To make use of this feature, have the following line in the App constructor:

public App()
{
    ...
    SplashFactory = (e) => new Views.Splash(e);
    ...
}

What you are specifying here is a view that defines the look of your splash screen. An example of such a view can be found in the Minimal template. The splash screen in this template displays a ProgressRing below the SplashScreen.png asset.

Any long running tasks, or initialisation code, can then be executed in OnStartAsync. Note that this is not run if the app is restoring from state.

Clone this wiki locally