The problem you encounter comes from the way, WPF manages the shutdown.
You can change the shutdown-behaviour through the ...
Application.Current.ShutdownMode
... property. Change it to an approriate value:
Application.Current.ShutdownMode = System.Windows.ShutdownMode.OnLastWindowClose;
this will help.
Another way is to set manually the MainWindow
-property to your second window.
If you want to make a splashscreen only, use the splashscreen option that is available since .net 3.51. IT has the advantage that it is loaded very early in the application loading sequence, much earlier that a window can.
To do that, open the properties-tab of an image in your project-explorer and set the Build Action to SplashScreen
Update
In one of my apps I had a design that also had to show a modal dialog before showing the main window. At this time I didn't knew about the ShutdownMode
-property.
What I did was I first started a Window
that was invisible to the user. This was the first window and it also controled app-livetime (default behaviour of WPF). Out from this window I opened the desired dialog (a window that was showed modal). If this dialog has completed unsuccessfull, I terminated the hidden window and the app completetely closed. If the dialog resulted ok, I created the first MainWindow-instance, the user can work with.