[wpf]wpf full screen.
void window_KeyDown(object sender,KeyEventArgs e)
{
if(e.Key == Key.F11)
{
Window.ResizeMode = ResizeMode.NoResize;
Window.WindowState = WindowState.Normal;
Window.WindowStyle = WindowStyle.None;
Window.Width = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width;
Window.Height = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height;
Window.Top = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Top;
Window.Left = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Left;
Window.WindowState = WindowState.Maximized;
}
}
| void window_KeyDown(object sender,KeyEventArgs e) | |
| { | |
| if(e.Key == Key.F11) | |
| { | |
| Window.ResizeMode = ResizeMode.NoResize; | |
| Window.WindowState = WindowState.Normal; | |
| Window.WindowStyle = WindowStyle.None; | |
| Window.Width = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width; | |
| Window.Height = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height; | |
| Window.Top = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Top; | |
| Window.Left = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Left; | |
| Window.WindowState = WindowState.Maximized; | |
| } | |
| } |

浙公网安备 33010602011771号