public void IsFullScreen () { Content content = new Content (); try { content.IsFullScreen = true; // only works from a user keyboard / mouse event Assert.IsFalse (content.IsFullScreen, "IsFullScreen"); } finally { content.IsFullScreen = false; } }
/// <summary> /// Initializes a new instance of GraphicsConfig. /// </summary> public GraphicsConfig() { InitializeComponent(); this.DataContext = new StringProvider(); this.Title = StringProvider.GraphicsConfig_PageTitle; _pluginVisual = Application.Current.Host.Content; _pluginVisual.FullScreenOptions = FullScreenOptions.StaysFullScreenWhenUnfocused; _pluginVisual.FullScreenChanged += (sender, e) => { if (_pluginVisual.IsFullScreen) { fullScreenButton.Content = StringProvider.GraphicsConfig_Windowed; } else { fullScreenButton.Content = StringProvider.GraphicsConfig_FullScreen; } }; }
public void Page_Loaded(object o, EventArgs e) { // Initialize variables _defaultVolume = mediaElement.Volume; BrowserHost = App.Current.Host.Content; // Initialize UI _primaryBoardDisplay = new BoardDisplay(); Children.Add(_primaryBoardDisplay); _fadingBoardDisplay = new BoardDisplay(); Children.Add(_fadingBoardDisplay); // Initialize handlers KeyUp += new KeyEventHandler(HandleKeyUp); MouseLeftButtonDown += new MouseButtonEventHandler(HandleMouseLeftButtonDown); BrowserHost.Resized += new EventHandler(HandleResize); // Create the starting board, play the "new" sound, and fade it in _primaryBoardDisplay.Board = Board.FromString(BoardWikipediaSample); PlaySoundEffect(SoundEffect.New); _fadingBoardDisplay.Fade(FadeSecondsLoading); }
public void New () { Content content = new Content (); Check (content); }
void Check (Content content) { Assert.IsTrue (content.ActualHeight >= 0, "ActualHeight"); Assert.IsTrue (content.ActualWidth >= 0, "ActualWidth"); Assert.IsFalse (content.IsFullScreen, "IsFullScreen"); }