ClassEnumBinder
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:
Inherited Members
Constructors
EnumBinder()
Initializes a new instance of the EnumBinder class.
Declaration
public EnumBinder()
EnumBinder(Type)
Initializes a new instance of the EnumBinder class with the specified source enum type.
Declaration
public EnumBinder(Type source)
Parameters
source
The enum type to bind to.
Properties
Count
Gets the number of EnumDescriptors in the collection.
IsReadOnly
Gets a value indicating whether the collection is read-only.
Declaration
[Browsable(false)]
public bool IsReadOnly { get; }
Property Value
Source
Gets or sets the source enum type.
Methods
Bind(object)
Binds the enum values to the specified target object.
Declaration
public bool Bind(object target)
Parameters
target
The target object to bind the enum values to.
Returns
true if the binding was successful; otherwise, false.
Exceptions
Thrown when target is null.
Contains(EnumDescriptor)
Determines whether the EnumBinder contains a specific EnumDescriptor.
Declaration
public bool Contains(EnumDescriptor item)
Parameters
item
The EnumDescriptor to locate.
Returns
true if the EnumDescriptor is found; otherwise, false.
CopyTo(EnumDescriptor[], int)
Copies the EnumDescriptors to an array, starting at a particular index.
Declaration
public void CopyTo(EnumDescriptor[] array, int arrayIndex)
Parameters
array
The destination array.
arrayIndex
The index at which to start copying.
GetEnumerator()
Returns an enumerator that iterates through the EnumDescriptor collection.
Declaration
public IEnumerator<EnumDescriptor> GetEnumerator()
Returns
IEnumerator<EnumDescriptor>
An enumerator for the EnumDescriptor collection.
Operators
implicit operator EnumBinder(Type)
Provides an implicit conversion from Type to EnumBinder.
Declaration
public static implicit operator EnumBinder(Type source)
Parameters
source
The enum type to convert from.
Returns
A new EnumBinder instance for the specified enum type.