Maximize WPF Window on the current screen
I am not sure if this is answered yet- I created a sample app with the
WindowStyle = WindowStyle.None;
I created a button and on the click handler did this-
WindowState = WindowState.Maximized
I hooked up the MouseLeftButtonDown handler for the window to drag move-
this.MouseLeftButtonDown += new(MainWindow_MouseLeftButtonDown);private void MainWindow_MouseLeftButtonDown(object sender, MouseButtonEventArgs e){ DragMove();}
When I dragged my window to my second monitor and clicked the maximize button, it maximized in the current window, not the startup window. I was using VS2010 and .NET 4. Let me know if this helps.