LookUpEditBase.SetupComboBoxEnumItemSource<T, DataType>(LookUpEditBase) Method
Binds the enumeration to the specified combo box editor.
Namespace: DevExpress.Xpf.Editors
Assembly: DevExpress.Xpf.Core.v14.2.dll
#Declaration
#Parameters
Name | Type | Description |
---|---|---|
combo |
Look |
A Look |
#Type Parameters
Name |
---|
T |
Data |
#Remarks
T - an enumeration type, whose members represent the combo box items. If the specified object doesn't represent the enumeration, an exception is thrown.
DataType - a type to which the enumeration members should be cast to get their values.
The SetupComboBoxEnumItemSource<T, DataType> method creates the list of items from the specified enumeration and assigns it to the LookUpEditBase.ItemsSource property. The LookUpEditBase.DisplayMember property is set to 'Text'. The LookUpEditBase.ValueMember property is set to 'Value'.
Example:
ComboBoxEdit.SetupComboBoxEnumItemSource<HorizontalAlignment, int>(dxCombo);