I have a windowless wpf application, whenever I set the window state as maximized it maximizes it on the primary display.
What I would like to do is have it maximize on
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.