How to add a Splash Screen to WPF application?
Splash Screens are always helpful while starting the application. At the time of loading application code & data from backend, it is alw...- Article authored by Kunal Chowdhury on .
Splash Screens are always helpful while starting the application. At the time of loading application code & data from backend, it is alw...- Article authored by Kunal Chowdhury on .
Splash Screens are always helpful while starting the application. At the time of loading application code & data from backend, it is always good to show a splash screen to the end user. It actually gives a look & feel of loading something and that time the user will see the first UI on his desktop. In .Net 3.5 SP1, this is really simple. Just do the following to add a simple basic splash screen to your application.
1. Create a PNG image & add it to your project. PNG images are better choice rather than BMP images because, they are lighter in size and you can also create a transparent PNG image.
2. Now right click on that image & click properties from the solution explorer of Visual Studio 2008 SP1.
3. Here you will find an option named “Build Action”. Select “SplashScreen” from the dropdown.
4. Save the project, build it & run the application.
Now you will see the image (Splash Screen) before rendering the actual application. After completion of rendering of the main window, the Splash Screen will automatically close. This way, it improves the startup experience of the WPF application.
Solution Architect & Former Microsoft MVP
Kunal Chowdhury is an enterprise solution architect and former multi-year Microsoft MVP. He is the author of three technical books: Windows Presentation Foundation Development Cookbook, Mastering Visual Studio 2017, and the Mastering Visual Studio 2019.
He publishes technical and non-technical articles on Kunal-Chowdhury.com.