How to bind enum to combo box control in WPF?

Forums ASP.NETHow to bind enum to combo box control in WPF?
Staff asked 2 years ago

Answers (1)

Add Answer
Staff answered 2 years ago

You can do it from code by placing the following code in Window Loaded event handler, for example:

yourComboBox.ItemsSource = Enum.GetValues(typeof(EffectStyle)).Cast<EffectStyle>();

 

Subscribe

Select Categories