How to set WPF window size to 25 percent of relative monitor screen
1 answer
In the constructor MainWindow add
this.Height = (System.Windows.SystemParameters.PrimaryScreenHeight * 0.25);
this.Width = (System.Windows.SystemParameters.PrimaryScreenWidth * 0.25);
Also, don't set WindowState = "Maximized" in your MainWindows.xaml, otherwise it won't work. Hope this helps.
+18
source to share