日期:2014-05-17 浏览次数:21219 次
private void MaxWindow(object sender, RoutedEventArgs e)
{
if (WindowState == WindowState.Normal)
{
this.MaxWidth = SystemParameters.WorkArea.Width;
this.MaxHeight = SystemParameters.WorkArea.Height;
WindowState = WindowState.Maximized;
}
else
{
WindowState = WindowState.Normal;
}
}
Double screenHeight = SystemParameters.FullPrimaryScreenHeight;/*-----获取主监视器屏幕的高度--------------------------------------*/
Double screenWidth = SystemParameters.FullPrimaryScreenWidth;/*-------获取主监视器屏幕的宽度--------------------------------------*/
//Double _screenHeight = SystemParameters.WorkArea.Height;/*-----获取主监视器工作区域屏幕的高度--------------------------------------*/
//Double _screenWidth = SystemParameters.WorkArea.Width;/*-------获取主监视器工作区域屏幕的宽度--------------------------------------*/