WindowTests ChangeTotalSize Method Delta Engine Documentation

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

public void ChangeTotalSize()
Examples

[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