Parameters

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 ItemsSource property. The DisplayMember property is set to 'Text'. The ValueMember property is set to 'Value'.