Exemple #1
0
 public void EnterFullScreen()
 {
     if (this.FullScreen)
     {
         return;
     }
     ControlFullScreenShell.EnterFullScreen(this);
 }
        public static void EnterFullScreen(Control control)
        {
            if (control == null || Shells.Contains(control))
            {
                return;
            }
            ControlFullScreenShell shell = new ControlFullScreenShell(control);

            if (control.Parent != null)
            {
                control.Parent.Controls.Remove(control);
            }
            control.Dock = DockStyle.Fill;
            shell.Controls.Add(control);
            shell.Text = control.Text;
            Shells.Add(control, shell);

            shell.FullScreen = true;
            shell.EnterFullScreen();
            shell.Show(shell.ControlParent);
        }