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

前端 未结 6 1449
执笔经年
执笔经年 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:08

    This one works the best...

    public MainWindow()
        {
            InitializeComponent();
            MaxHeight = SystemParameters.VirtualScreenHeight;
            MaxWidth = SystemParameters.VirtualScreenWidth;
        }
    

提交回复
热议问题