Window IsFullscreen Property Delta Engine Documentation

Namespace: DeltaEngine.Core
Assembly: DeltaEngine (in DeltaEngine.dll) Version: 1.1.1.0 (1.1.1)
Syntax

bool IsFullscreen { get; }

Property Value

Type: Boolean
Remarks

Tests: DeltaEngine.Tests.Core.WindowTests
Examples

2 unit tests call DeltaEngine.Core.Window.IsFullscreen
/// <summary> 
/// Use the DeviceTests.SetFullscreenResolution to see the real resolution switching 
/// </summary>
[Test]
public void SetFullscreenMode()
{
    var newFullscreenSize = new Size(1024, 768);
    Assert.IsFalse(window.IsFullscreen);
    bool fullscreenChangedWasCalled = false;
    window.FullscreenChanged += (size, b) => fullscreenChangedWasCalled = true;
    SetFullscreenWindow(newFullscreenSize);
    Assert.IsTrue(window.IsFullscreen);
    Assert.AreEqual(newFullscreenSize, window.TotalPixelSize);
    Assert.IsTrue(fullscreenChangedWasCalled);
}
[Test]
public void SwitchToFullscreenAndWindowedMode()
{
    Size sizeBeforeFullscreen = window.TotalPixelSize;
    window.SetFullscreen(new Size(1024, 768));
    window.SetWindowed();
    Assert.IsFalse(window.IsFullscreen);
    Assert.AreEqual(sizeBeforeFullscreen, window.TotalPixelSize);
}
See Also