WPF : Maximize window with WindowState Problem (application will hide windows taskbar)

前端 未结 6 1537
执笔经年
执笔经年 2020-12-30 01:30

I have set my main window state to \"Maximized\" but the problem is my application will fill the whole screen even task bar. what am i doing wrong ? I\'m using windows 2008

6条回答
  •  [愿得一人]
    2020-12-30 02:00

    You can set the MaxHeight property of that window to SystemParameters.MaximizedPrimaryScreenHeight using the constructor.

    public MainWindow()
    {
        InitializeComponent();
        this.MaxHeight = SystemParameters.MaximizedPrimaryScreenHeight;
    }
    

提交回复
热议问题