Make a Splash Screen in WPF application - C#

In this tutorial we will explore how to create a Splash Screen in WPF application in a easiest way. So let's start by creating a WPF project.


Then, add Splash Screen image to the project by right clicking on project > Add new item > Splash Screen



Double click on the Splash Screen image in Solution Explorer to make modifications on its properties and write on it.


Finally, add this code in MainWindow.xaml.cs before InitializeComponent();

SplashScreen splash = new SplashScreen("SplashScreen1.png");
splash.Show(false);
Thread.Sleep(1000);
splash.Close(TimeSpan.FromSeconds(10));


According to this code, the Splash Screen will be shown for 10 seconds before the application loads.
Make a Splash Screen in WPF application - C# Make a Splash Screen in WPF application - C# Reviewed by Bloggeur DZ on 12:53 Rating: 5

Aucun commentaire:

Fourni par Blogger.