Gets/sets an object implementing
System.Collections.IEnumerable which contains a list of value options. Note, this property defaults to a null (Nothing) value.
The following code sets the Enumeration property of a ValueConstraint to an Array containing A, B and C strings. The ValueConstraint is assigned to XamTextEditor. The editor will make sure that the entered value is A, B or C (upper case). If any other value is entered then when the user attempts to leave the editor, the editor will take action based on InvalidValueBehavior setting which in the following code snippet is set to DisplayErrorMessage.
<!--This editor will make sure that the text entered is A, B or C (upper case)-->
<igEditors:XamTextEditor x:Name="textEditor4" InvalidValueBehavior="DisplayErrorMessage" >
<igEditors:XamTextEditor.ValueConstraint>
<igEditors:ValueConstraint>
<igEditors:ValueConstraint.Enumeration>
<x:Array Type="{x:Type system:Object}">
<system:String>A</system:String>
<system:String>B</system:String>
<system:String>C</system:String>
</x:Array>
</igEditors:ValueConstraint.Enumeration>
</igEditors:ValueConstraint>
</igEditors:XamTextEditor.ValueConstraint>
</igEditors:XamTextEditor>
'Declaration
Public Property Enumeration As IEnumerable
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2