<Window>标签绑定事件SourceInitialized="Window_SourceInitialized"

    1. //初始化全屏
    2. private void Window_SourceInitialized(object sender, EventArgs e)
    3. {
    4. this.Topmost = true;
    5. this.Left = 0.0;
    6. this.Top = 0.0;
    7. this.Width = System.Windows.SystemParameters.PrimaryScreenWidth;
    8. this.Height = System.Windows.SystemParameters.PrimaryScreenHeight;
    9. this.WindowState = System.Windows.WindowState.Normal;
    10. this.WindowStyle = System.Windows.WindowStyle.None;
    11. this.ResizeMode = System.Windows.ResizeMode.NoResize;
    12. }