private void WindowMain_Loaded(object sender, RoutedEventArgs e)
{
this.WindowState = System.Windows.WindowState.Maximized;//默认最大化
this.Width = System.Windows.SystemParameters.PrimaryScreenWidth;//将宽度设置为屏幕的宽度
this.Height = System.Windows.SystemParameters.PrimaryScreenHeight;//将高度设置为屏幕的高度
}
//找到主窗体,点击 load事件,编写代码