WPF中弹出界面在不影响状态栏的情况下占满界面

举例子:比如在 MainView.xaml.cs

可以写在Window_Loaded事件中

 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     this.Left = 0.0;
     this.Top = 0.0;
     this.Height = SystemParameters.WorkArea.Height;
     this.Width = SystemParameters.WorkArea.Width;////得到屏幕工作区域宽度
 }

 这样弹出界面的时候,即可全屏展示

posted @ 2023-04-20 16:52  在你看不见的高空  阅读(113)  评论(0编辑  收藏  举报