skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • AI Coding Assistants
    • Embedded Reporting
    • Document Processing Libraries
    • SSO Account Sign-in

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class EnumBinder

Provides functionality for binding enum values to UI components.

Inheritance
System.Object
EnumBinder
Namespace: Telerik.WinControls.UI.Data
Assembly: Telerik.WinControls.UI.dll

Syntax

[ComVisible(false)]
public class EnumBinder : Component, ICollection<EnumDescriptor>, IEnumerable<EnumDescriptor>, IEnumerable

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
System.Type source

The enum type to bind to.

Properties

Count

Gets the number of EnumDescriptors in the collection.

Declaration
public int Count { get; }
Property Value
System.Int32

Implements
System.Collections.Generic.ICollection<T>.Count

IsReadOnly

Gets a value indicating whether the collection is read-only.

Declaration
public bool IsReadOnly { get; }
Property Value
System.Boolean

Implements
System.Collections.Generic.ICollection<T>.IsReadOnly

Source

Gets or sets the source enum type.

Declaration
public Type Source { get; set; }
Property Value
System.Type

Target

Gets or sets the target object to bind the enum values to.

Declaration
public object Target { get; set; }
Property Value
System.Object

Methods

Bind(Object)

Binds the enum values to the specified target object.

Declaration
public bool Bind(object target)
Parameters
System.Object target

The target object to bind the enum values to.

Returns
System.Boolean

true if the binding was successful; otherwise, false.

Exceptions
System.ArgumentNullException

Thrown when target is null.

Contains(EnumDescriptor)

Determines whether the EnumBinder contains a specific EnumDescriptor.

Declaration
public bool Contains(EnumDescriptor item)
Parameters
EnumDescriptor item

The EnumDescriptor to locate.

Returns
System.Boolean

true if the EnumDescriptor is found; otherwise, false.

Implements
System.Collections.Generic.ICollection<T>.Contains(T)

CopyTo(EnumDescriptor[], Int32)

Copies the EnumDescriptors to an array, starting at a particular index.

Declaration
public void CopyTo(EnumDescriptor[] array, int arrayIndex)
Parameters
EnumDescriptor[] array

The destination array.

System.Int32 arrayIndex

The index at which to start copying.

Implements
System.Collections.Generic.ICollection<T>.CopyTo(T[], System.Int32)

GetEnumerator()

Returns an enumerator that iterates through the EnumDescriptor collection.

Declaration
public IEnumerator<EnumDescriptor> GetEnumerator()
Returns
System.Collections.Generic.IEnumerator<EnumDescriptor>

An enumerator for the EnumDescriptor collection.

Implements
System.Collections.Generic.IEnumerable<T>.GetEnumerator()

Operators

Implicit(Type to EnumBinder)

Provides an implicit conversion from Type to EnumBinder.

Declaration
public static implicit operator EnumBinder(Type source)
Parameters
System.Type source

The enum type to convert from.

Returns
EnumBinder

A new EnumBinder instance for the specified enum type.

Explicit Interface Implementations

ICollection<EnumDescriptor>.Add(EnumDescriptor)

Declaration
void ICollection<EnumDescriptor>.Add(EnumDescriptor item)
Parameters
EnumDescriptor item

Implements
System.Collections.Generic.ICollection<T>.Add(T)

ICollection<EnumDescriptor>.Clear()

Declaration
void ICollection<EnumDescriptor>.Clear()
Implements
System.Collections.Generic.ICollection<T>.Clear()

ICollection<EnumDescriptor>.Remove(EnumDescriptor)

Declaration
bool ICollection<EnumDescriptor>.Remove(EnumDescriptor item)
Parameters
EnumDescriptor item

Returns
System.Boolean

Implements
System.Collections.Generic.ICollection<T>.Remove(T)

IEnumerable.GetEnumerator()

Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
System.Collections.IEnumerator

Implements
System.Collections.IEnumerable.GetEnumerator()

Extension Methods

SvgExtentions.Traverse<T>(T, Func<T, IEnumerable<T>>)
SvgExtentions.TraverseDepthFirst<T>(T, Func<T, IEnumerable<T>>)
Getting Started
  • Install Now
  • Demos
  • Step-by-Step Tutorial
  • Sample Applications
  • SDK Samples
  • Visual Studio Extensions
Support Resources
  • Code Library
  • Knowledge Base
  • Videos
Community
  • Forums
  • Blogs
  • Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.