Class ControlExtensions
- Namespace
- ExControls
- Assembly
- ExControls.dll
Extension methods for controls.
public static class ControlExtensions
- Inheritance
-
ControlExtensions
- Inherited Members
Methods
BindEnum<T>(ComboBox, Dictionary<T, string>)
Binds the combo box to enum values: the items show the texts from dictionary and
SelectedValue is the enum value.
public static void BindEnum<T>(this ComboBox cb, Dictionary<T, string> dictionary) where T : Enum
Parameters
cbComboBoxcombo box to bind
dictionaryDictionary<T, string>enum values with their display texts, in the order of the items
Type Parameters
Ttype of the enum
Exceptions
- ArgumentNullException
when
cbordictionaryis null.