最近在用C# 的WPF框架做一个项目,其中window页面显示时需要全屏显示。
由于之前对这块不是很熟悉,就网上百度了一些WPF下如何将窗口全屏显示,得到的结果差不多是这样,
this.Topmost = true;
this.Left = 0.0;
this.Top = 0.0;
this.Width = System.Windows.SystemParameters.PrimaryScreenWidth;
this.Height = System.Windows.SystemParameters.PrimaryScreenHeight;
this.WindowState = System.Windows.WindowState.Normal;
this.WindowStyle = System.Windows.WindowStyle.None;
this.ResizeMode = System.Windows.ResizeMode.NoResize;
于是我把上面代码放在Window_Loaded方法中,
private void FourStageIntroWindow_Loaded(object sender, RoutedEventArgs e)
{
Console.WriteLine("**********************Loaded***************");
this.Topmost = true;
this.Left = 0.0;
this.Top = 0.0;
this.Width = System.Windows.SystemPar