I want to center my WPF app on startup on the primary screen. I know I have to set myWindow.Left and myWindow.Top, but where do I get the values?
I found System.Wi
System.Wi
You don't need to reference the System.Windows.Forms assembly from your application. Instead, you can use System.Windows.SystemParameters.WorkArea. This is equivalent to the System.Windows.Forms.Screen.PrimaryScreen.WorkingArea!
System.Windows.Forms
System.Windows.SystemParameters.WorkArea
System.Windows.Forms.Screen.PrimaryScreen.WorkingArea