PercentageBar Maximum Property Delta Engine Documentation

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

public float Maximum { get; set; }

Property Value

Type: Single
Remarks

Tests: DeltaEngine.Scenes.Tests.Controls.PercentageBarTests
Examples

4 unit tests call DeltaEngine.Scenes.Controls.PercentageBar.Maximum
[Test, CloseAfterFirstFrame]
public void DefaultValues()
{
    Assert.AreEqual(0, bar.Minimum);
    Assert.AreEqual(100, bar.Maximum);
    Assert.AreEqual(100, bar.Value);
    Assert.AreEqual(Center, bar.DrawArea);
    Assert.AreEqual(Width, bar.MaxWidth);
    Assert.AreEqual(HighColor, bar.Color);
    Assert.AreEqual(PercentileColors, bar.PercentileColors);
    Assert.AreEqual(PercentageBar.HorizontalAlignment.Left, bar.Alignment);
}
[Test, CloseAfterFirstFrame]
public void ChangeMaximum()
{
    bar.Maximum = 30;
    Assert.AreEqual(30, bar.Maximum);
}
[Test, CloseAfterFirstFrame]
public void ValueCannotGoAboveMaximum()
{
    bar.Value = 110;
    Assert.AreEqual(100, bar.Value);
    Assert.AreEqual(Width, bar.DrawArea.Width);
    Assert.AreEqual(Color.Green, bar.Color);
}
See Also