Maximize WPF Window on the current screen

后端 未结 10 691
谎友^
谎友^ 2021-01-31 07:35

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

10条回答
  •  一整个雨季
    2021-01-31 08:09

    I've included this line on my MainWindow (first control) constructor:

    Application.Current.MainWindow.WindowState = WindowState.Maximized;
    

提交回复
热议问题