void View_ExitFullScreen(object sender, EventArgs e) { if (__FeaturesCommand.ContainsKey(FullScreenFeature) && __FeaturesCommand [FullScreenFeature] is ToggleFullScreenCommand) { ToggleFullScreenCommand cmd = (ToggleFullScreenCommand)__FeaturesCommand [FullScreenFeature]; if (cmd.FullScreen) { ExecuteFeature(FullScreenFeature); } } }
private void ConfigureToggleFullScreenFeature( ) { ToggleFullScreenCommand fullScreenCmd; fullScreenCmd = new ToggleFullScreenCommand(View.DisplayContainer); __FeaturesCommand.Add(FullScreenFeature, fullScreenCmd); fullScreenCmd.CommandExecuted += new EventHandler(fullScreenCmd_CommandExecuted); View.CanToggleFullScreen = true; View.DoToggleFullScreen += new EventHandler(View_DoToggleFullScreen); View.ExitFullScreen += new EventHandler(View_ExitFullScreen); }