Hello Devz,

In a previous post I was talking about the fact that there is no “out-of-the-box” solution to bind an Enum to a ComboBox. And I described the WPF way of doing it with the ObjectDataProvider defined in the XAML.

Here is another way, more code oriented than XAML.

This is the XAML part:

Here is our Enum:

And here is our MarkupExtension:

If you want to go further, please have a look to the best way to bind your Enum to a ComboBox with the Description Attribute in your MVVM WPF application.

Happy binding!  😉