Exemplo n.º 1
0
 private void MenuItem_Click(object sender, RoutedEventArgs e)
 {
     if (!w)
     {
         Taskbar.Hide();
         WindowStyle = WindowStyle.None;
         WindowState = WindowState.Maximized;
         ResizeMode  = ResizeMode.NoResize;
         Width       = System.Windows.SystemParameters.PrimaryScreenWidth;
         Height      = System.Windows.SystemParameters.PrimaryScreenHeight;
         Topmost     = true;
         this.Left   = 0;
         this.Top    = 0;
     }
     else
     {
         Taskbar.Show();
         WindowStyle = WindowStyle.SingleBorderWindow;
         WindowState = WindowState.Normal;
         ResizeMode  = ResizeMode.CanResize;
         Width       = System.Windows.SystemParameters.WorkArea.Width - 100;
         Height      = System.Windows.SystemParameters.WorkArea.Height - 100;
         Topmost     = false;
         this.Left   = 0;
         this.Top    = 0;
     }
     w = !w;
 }
Exemplo n.º 2
0
 private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     Taskbar.Show();
 }