ThemeTests SaveAndLoadModifiedTheme Method Delta Engine Documentation

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

public void SaveAndLoadModifiedTheme()
Examples

[Test, CloseAfterFirstFrame]
public void SaveAndLoadModifiedTheme()
{
    var theme = new Theme();
    theme.Slider = new Material(ShaderFlags.Position2DColoredTextured, "DeltaEngineLogo")
    {
        DefaultColor = Color.Red
    };
    var stream = BinaryDataExtensions.SaveToMemoryStream(theme);
    var loadedTheme = (Theme)stream.CreateFromMemoryStream();
    Assert.IsTrue(AreMaterialsEqual(theme.Slider, loadedTheme.Slider));
}
See Also