Navigation

Wednesday, May 12, 2010

How to create a splash screen in WPF application

Creating a splash screen in WPF and VS2010 is a bit different then previous methods.  The simplest way is to add an PNG image of the splash screen you want to use.  Add it to your solutions and let the Build Action for it to SplashScreen.

image

Why PNG vs. BMP ?

The advantage of using a .PNG image over .BMP for your splash screen is that you will have better control on your Splash UI (for example, provide transparency if combined with UpdateLayeredWindow() API [which is not used in this sample]) and also will reduce the overall size of your app. Therefore, it will improve performance by decreasing the cold start and application deployment time.

In this sample the PNG version of the app is about 7 times smaller than the BMP one.

No comments: