RadioButtonTests SaveAndLoad 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 SaveAndLoad()
Examples

[Test]
public void SaveAndLoad()
{
    centerButton.Text = "Original";
    var stream = BinaryDataExtensions.SaveToMemoryStream(centerButton);
    var loadedButton = (RadioButton)stream.CreateFromMemoryStream();
    loadedButton.Text = "Loaded";
    Assert.AreEqual(Center, loadedButton.DrawArea);
    loadedButton.DrawArea = loadedButton.DrawArea.Move(new Vector2D(0.0f, 0.1f));
}
See Also