Posts Enum ComboBox ItemsSource entirely in XAML
Post
Cancel

Enum ComboBox ItemsSource entirely in XAML

All too often we need to present users with a simple set of options based on an applicable enumerator. I found a great way to do this entirely with XAML, which makes it well suited for the MVVM pattern. Assuming your enumerator names aren’t too cryptic or disgusting, then this trick should work great for any control with an ItemsSource property.

The best example of the ObjectDataProvider solution can be found on Ivan Derevianko’s blog.

This post is licensed under CC BY 4.0 by the author.