SceneTests ClearingControlsDeactivatesThem Method Delta Engine Documentation

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

public void ClearingControlsDeactivatesThem()
Examples

[Test, CloseAfterFirstFrame]
public void ClearingControlsDeactivatesThem()
{
    var label = new Sprite(material, Rectangle.One) { IsActive = true };
    var control = new EmptyControl { IsActive = true };
    scene.Add(label);
    scene.Add(control);
    scene.Clear();
    Assert.AreEqual(0, scene.Controls.Count);
    Assert.IsFalse(label.IsActive);
    Assert.IsFalse(control.IsActive);
}
See Also