How to create a splash screen for Windows Phone
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
For apps that take more than a couple of seconds to load, you can display a splash screen to give the user immediate feedback that the app is launching. You can also use a splash screen to provide brand identification and to customize your app.
This topic contains the following sections.
Typically, you should use a splash screen in your app only if your app is unusually slow to load or if you want to add additional branding to the app. If you decide to use a splash screen in your app, you have two options.
You can add a single splash screen image that the phone automatically scales for the three supported phone resolutions.
You can add three versions of the same image, one for each of the three supported resolutions.
If you’re using a single image, you should add an image file that is 768 × 1,280 and named SplashScreenImage.jpg to your app project. The phone automatically scales the image to the correct size.
If you want to provide pixel-perfect splash screens for all resolutions, you can add the following images to the root folder of your app project.
Dimensions in pixels
480 × 800
768 × 1,280
720 x× 1,280
You must set the Build Action property of the image(s) to Content.
Each new Windows Phone OS 7.1 project includes a SplashScreenImage.jpg file. To customize the splash screen, you can substitute your own image for the default image. You can replace the default image with any image you choose, but it must be 480 × 800 pixels in size, and it must be named SplashScreenImage.jpg. You must set the Build Action property of the image to Content.
Windows Phone 8 apps load quickly, so a Windows Phone 8 app usually doesn’t need a splash screen. New Windows Phone 8 projects don’t include a default splash screen image file. However, if you want to use a splash screen in your Windows Phone 8 app, add an existing JPG image file to the root folder of your Windows Phone 8 project, and name the file SplashScreenImage.jpg.
For apps that take a long time to load, we recommend that you create an animated splash screen to indicate progress while your app prepares to run. One way to do this is by creating a Popup control that displays the animation while the app resources are loading. When the app has finished loading, you can hide the Popup control. For more info about animations, see Quickstart: Animations for Windows Phone.
Instead of using SplashScreenImage.jpg with XNA Framework games, you should render a texture to display at startup while other content loads. In addition, you can minimize start time by keeping the entry assembly small. The following steps describe how you can load a texture at startup.
In the Initialize() method:
Call base.Initialize() to create the GraphicsDevice property.
Load the texture. Size it to the target resolution and orientation of the game. Set the texture to auto resize to a power of 2. Use DXT compressed format.
Create a SpriteBatch class.
Render the texture.
In the Update() method, incrementally load your content.
In the Draw() method, continue to draw the start texture, and then switch to a loading animation as soon as those assets are loaded.