Class EnumDataSource
Provides a collection of view models suitable for combo-box binding.
Inheritance
Namespace: Telerik.Windows.Data
Assembly: Telerik.Windows.Data.dll
Syntax
public class EnumDataSource : Object, IEnumerable, INotifyCollectionChanged
Constructors
EnumDataSource()
Properties
EnumType
Gets or sets the type of the enum.
Declaration
public Type EnumType { get; set; }
Property Value
System.Type
The type of the enumeration. |
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
System.Type
enumType
The enumeration type. |
Returns
System.Collections.Generic.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, ValueType
Returns
System.Collections.Generic.IEnumerable<EnumMemberViewModel>
A collection of EnumMemberViewModel's based on the supplied enumeration type. |
Type Parameters
TEnum
The enumeration type. |
GetEnumerator()
Returns an enumerator that iterates through a collection.
Declaration
public IEnumerator GetEnumerator()
Returns
System.Collections.IEnumerator
An System.Collections.IEnumerator object that can be used to iterate through the collection. |
Events
CollectionChanged
Occurs when the collection changes.
Declaration
public event NotifyCollectionChangedEventHandler CollectionChanged
Event Type
System.Collections.Specialized.NotifyCollectionChangedEventHandler
|