Table of Contents

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

cb ComboBox

combo box to bind

dictionary Dictionary<T, string>

enum values with their display texts, in the order of the items

Type Parameters

T

type of the enum

Exceptions

ArgumentNullException

when cb or dictionary is null.