Window InterfaceDelta Engine Documentation
Window form the application is running in. In Windows this is done with Windows Forms or WPF. View code on GitHub

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

public interface Window : IDisposable

The Window type exposes the following members.

Methods

  NameDescription
Public methodCloseAfterFrame
Public methodCopyTextToClipboard
Public methodPresent
Public methodSetCursorIcon
Public methodSetFullscreen
Public methodSetWindowed
Public methodShowMessageBox
Top
Properties

  NameDescription
Public propertyBackgroundColor
Public propertyHandle
Public propertyIsClosing
Public propertyIsFullscreen
Public propertyIsVisible
Public propertyIsWindowsFormAndNotJustAPanel
Public propertyOrientation
Public propertyPixelPosition
Public propertyShowCursor
Public propertyTitle
Public propertyTotalPixelSize
Public propertyViewportPixelPosition
Public propertyViewportPixelSize
Top
Events

  NameDescription
Public eventFullscreenChanged
Public eventOrientationChanged
Public eventViewportSizeChanged
Top
Remarks

Tests: DeltaEngine.Tests.Core.WindowTests
Examples

7 unit tests call DeltaEngine.Core.Window
[Test]
public void CreateWindow()
{
    Assert.IsTrue(window.IsVisible);
}
[Test]
public void SetAndGetTitle()
{
    window.Title = "TestTitle";
    Assert.AreEqual("TestTitle", window.Title);
}
[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