Window ViewportPixelSize Property Delta Engine Documentation

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

Size ViewportPixelSize { get; set; }

Property Value

Type: Size
Remarks

Tests: DeltaEngine.Tests.Core.WindowTests
Examples

1 unit tests call DeltaEngine.Core.Window.ViewportPixelSize
[Test]
public void ChangeTotalSize()
{
    Assert.AreEqual(new Size(320, 180), window.ViewportPixelSize);
    Size changedSize = window.TotalPixelSize;
    window.ViewportSizeChanged += size => changedSize = size;
    window.ViewportPixelSize = new Size(200, 200);
    Assert.AreEqual(new Size(200, 200), window.ViewportPixelSize);
    Assert.IsTrue(window.ViewportPixelSize.Width <= 200);
    Assert.IsTrue(window.ViewportPixelSize.Height <= 200);
    Assert.IsTrue(changedSize.Width <= 200);
    Assert.IsTrue(changedSize.Height <= 200);
}
See Also