0

I have an image that is my splashscreen in my project. I did so by changing the build action to 'SplashScreen'.

In my application I start up the main OnStartup function by doing some background setup, and then ending with this:

mainWindow.DataContext = mainWindowViewModel;
mainWindow.Show();

The mainWindow is set to show on CenterScreen. However, when running, the program shows the splashscreen on one monitor and the program on another.

How can I set it up so that the screen shows up right on top of where the mainWindow will pop up within the monitors?

Salah Akbari
  • 39,330
  • 10
  • 79
  • 109
Kat
  • 2,460
  • 2
  • 36
  • 70
  • 2
    The WPF SplashScreen class is hard-coded to be displayed on the center of the primary monitor. No knobs to tweak. As long as you keep using it, you're doomed to have to display your main window [on the primary monitor as well](http://stackoverflow.com/questions/6324276/wpf-start-in-primary-screen). – Hans Passant Aug 28 '15 at 19:29
  • @HansPassant I guess the answer to this will be to force the main window to the primary monitor (which is fine by me). Thanks! – Kat Aug 28 '15 at 19:36
  • FWIW, Splash screens are bad for usability. Is there any way you can modify your software to not require a splash-screen? – Dai Aug 28 '15 at 20:08
  • @Dai Yes. However, it is a customer's request. – Kat Aug 28 '15 at 20:24

0 Answers0