EnumBinder
Provides functionality for binding enum values to UI components.
Definition
Namespace:Telerik.WinControls.UI.Data
Assembly:Telerik.WinControls.UI.dll
Syntax:
[ComVisible(false)]
public class EnumBinder : Component, IComponent, IDisposable, IEnumerable
Inheritance: objectMarshalByRefObjectComponentEnumBinder
Implements:
Constructors
Initializes a new instance of the EnumBinder class.
public EnumBinder()
Initializes a new instance of the EnumBinder class with the specified source enum type.
Properties
Gets the number of EnumDescriptors in the collection.
[Browsable(false)]
public int Count { get; }
Gets a value indicating whether the collection is read-only.
[Browsable(false)]
public bool IsReadOnly { get; }
Methods
Binds the enum values to the specified target object.
public bool Bind(object target)
The target object to bind the enum values to.
Returns:true if the binding was successful; otherwise, false.
Exceptions: ArgumentNullExceptionThrown when target is null.
Determines whether the EnumBinder contains a specific EnumDescriptor.
public bool Contains(EnumDescriptor item)
The EnumDescriptor to locate.
Returns:true if the EnumDescriptor is found; otherwise, false.
Copies the EnumDescriptors to an array, starting at a particular index.
public void CopyTo(EnumDescriptor[] array, int arrayIndex)
The destination array.
arrayIndexintThe index at which to start copying.
Returns an enumerator that iterates through the EnumDescriptor collection.
public IEnumerator<EnumDescriptor> GetEnumerator()
IEnumerator<EnumDescriptor>
An enumerator for the EnumDescriptor collection.
Operators
Provides an implicit conversion from Type to EnumBinder.
public static implicit operator EnumBinder(Type source)
The enum type to convert from.
Returns:A new EnumBinder instance for the specified enum type.