AnchoringTests RightMargin 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 RightMargin()
Examples

[Test, CloseAfterFirstFrame]
public void Constructor()
{
    Assert.AreEqual(new Margin(Edge.Left), anchoring.LeftMargin);
    Assert.AreEqual(new Margin(Edge.Right), anchoring.RightMargin);
    Assert.AreEqual(new Margin(Edge.Top), anchoring.TopMargin);
    Assert.AreEqual(new Margin(Edge.Bottom), anchoring.BottomMargin);
    Assert.AreEqual(-1, anchoring.PercentageSpan);
}
[Test, CloseAfterFirstFrame]
public void RightMargin()
{
    anchoring.RightMargin = new Margin(Edge.Right, 0.05f);
    AssertNearlyEqual(new Rectangle(0.65f, 0.3f, 0.3f, 0.4f),
        anchoring.CalculateDrawArea(control));
}
[Test, CloseAfterFirstFrame]
public void LeftRightMargin()
{
    anchoring.LeftMargin = new Margin(Edge.Left, 0.05f);
    anchoring.RightMargin = new Margin(Edge.Right, 0.15f);
    AssertNearlyEqual(new Rectangle(0.05f, -0.0333f, 0.8f, 1.0666f),
        anchoring.CalculateDrawArea(control));
}
See Also