Skip to content

Instantly share code, notes, and snippets.

@Konard
Created October 30, 2013 14:28
Show Gist options
  • Save Konard/7233618 to your computer and use it in GitHub Desktop.
Save Konard/7233618 to your computer and use it in GitHub Desktop.
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;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment