Background: My notebook is normally placed in a docking station, to which a big screen is connected. The icon for a (WPF) app is located on the screen of the notebook. Windows (7, 64 bit) opens the app on the notebook monitor instead of the big monitor.
I can move the icon onto the big monitor, and Windows will open the app on that monitor. But after starting the notebook not attached to the docking station, the icon is placed on the notebook's monitor again (and I'd actually prefer to have it there on the small screen)...
I found some code to programmatically set the location of the main window of the application, see How to set WPF window position in secondary display That works - but: only for the main window. All further windows are opened on the screen where the icon resides.
Now, I could specify the position for all other windows, too. Or I could write some code which stores the position when a window gets closed, remembering screen (preferred or other) also, and thus re-set it when the window gets loaded depending on available screens.
But that's overkill: actually, I just want to specify that the windows get opened some where on the big screen when that is available - I do not even care for the exact position on the screen (Windows could determine that the way it does now).
What simple solution can you suggest?