private void Window_Loaded()
{
////去掉窗口放大缩小按键
//this.WindowState = System.Windows.WindowState.Normal;
//this.WindowStyle = System.Windows.WindowStyle.None;
//this.ResizeMode = System.Windows.ResizeMode.NoResize;
//this.Topmost = true;
// 设置全屏
this.Left = 0.0;
this.Top = 0.0;
this.Width = System.Windows.SystemParameters.PrimaryScreenWidth;
this.Height = System.Windows.SystemParameters.PrimaryScreenHeight;
}
这段代码展示了如何在Windows应用程序加载时禁用窗口的放大和缩小功能,并将窗口设置为全屏显示,覆盖整个屏幕的宽度和高度。
1175

被折叠的 条评论
为什么被折叠?



