WPF Core how do I make a splash screen on startup?

2k Views Asked by At

How do I redefine the App class in order to load the screen saver window first when launching the app? In normal WPF, this was done quite easily by installing the App as a Page. This cannot be done in WPF Core... I know how to do this with writing a lot of extra code that I didn't need to write before. Who thread knows a simpler version in WPF Core?

1

There are 1 best solutions below

0
Andy On

The same process used previously in .net works in .net core.

You add a picture to the project.

In it's properties, set it's build action to SplashScreen.

https://learn.microsoft.com/en-us/dotnet/framework/wpf/app-development/how-to-add-a-splash-screen-to-a-wpf-application

Since any splash screen should not have dynamic content, this usually just has a logo in it.

On applications I've worked on in the past we included data like version number in the picture used and changed the picture before each delivery. Our default picture had a totally different background so it was immediately obvious you were running with the wrong splash screen.