How to set the Height and width of a WPF application on maximise? Problem I face is because of variable height of the windows taskbar in different computers
Presently, I am doing it like this. Please suggest any better technique
if (this.WindowState == WindowState.Maximized)
{
this.Height = primaryScreenHeight - 10 - System.Windows.Forms.SystemInformation.SizingBorderWidth;
this.Width = primaryScreenWidth + 2 * System.Windows.Forms.SystemInformation.FrameBorderSize.Width;
}