ClassEnumDataSource
Provides a collection of view models suitable for combo-box binding.
Definition
Namespace:Telerik.Windows.Data
Assembly:Telerik.Windows.Data.dll
Syntax:
public class EnumDataSource : IEnumerable, INotifyCollectionChanged
Inheritance: objectEnumDataSource
Implements:
Constructors
EnumDataSource()
Initializes a new instance of the EnumDataSource class.
Declaration
public EnumDataSource()
Properties
Methods
FromType(Type)
Returns a collection of EnumMemberViewModel's based on the supplied enumeration type. You can use this method's return value as the ItemsSource of a combo-box.
Declaration
public static IEnumerable<EnumMemberViewModel> FromType(Type enumType)
Parameters
enumType
The enumeration type.
Returns
IEnumerable<EnumMemberViewModel>
A collection of EnumMemberViewModel's based on the supplied enumeration type.
FromType<TEnum>()
Returns a collection of EnumMemberViewModel's based on the supplied enumeration type. You can use this method's return value as the ItemsSource of a combo-box.
Declaration
public static IEnumerable<EnumMemberViewModel> FromType<TEnum>() where TEnum : struct
Returns
IEnumerable<EnumMemberViewModel>
A collection of EnumMemberViewModel's based on the supplied enumeration type.
GetEnumerator()
Returns an enumerator that iterates through a collection.
Declaration
public IEnumerator GetEnumerator()
Returns
An IEnumerator object that can be used to iterate through the collection.
Implements
Events
CollectionChanged
Occurs when the collection changes.
Declaration
public event NotifyCollectionChangedEventHandler CollectionChanged
Event Value
Implements