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
What about the SystemParameters class in PresentationFramework? It has a WorkArea property that seems to be what you are looking for.
But, why won't setting the Window.WindowStartupLocation work? CenterScreen is one of the enum values. Do you have to tweak the centering?