DropdownList Values 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 List<Object> Values { get; set; }

Property Value

Type: List Object 
Remarks

Tests: DeltaEngine.Scenes.Tests.Controls.DropdownListTests
Examples

12 unit tests call DeltaEngine.Scenes.Controls.DropdownList.Values
[Test]
public void RenderDropdownListWithTenValues()
{
    SetToTenValues();
}
[Test, CloseAfterFirstFrame]
public void DefaultProperties()
{
    Assert.AreEqual(Values, dropdownList.Values);
    Assert.AreEqual(Values[0], dropdownList.SelectedValue);
    Assert.AreEqual(Center, dropdownList.DrawArea);
    Assert.AreEqual(Color.Gray, dropdownList.Color);
    Assert.AreEqual(3, dropdownList.SelectBox.texts.Count);
    Assert.IsFalse(dropdownList.IsPauseable);
    Assert.AreEqual(3, dropdownList.MaxDisplayCount);
}
[Test, CloseAfterFirstFrame]
public void NoValuesThrowsException()
{
    Assert.Throws<SelectBox.MustBeAtLeastOneValue>(() => new DropdownList(Rectangle.Zero, null));
    Assert.Throws<SelectBox.MustBeAtLeastOneValue>(
        () => new DropdownList(Rectangle.Zero, new List<object>()));
}
See Also