I have a list item data template that contains a textbox and a combobox.
I’ve two way databound the textbox to a public string property in the list item, but I want to be able to bind the combobox to an enum and display their public friendly versions in the combobox items and maintain the two way binding ability.
I’m still pretty new to the whole concept of databinding, and components of MVVM, but i’m picking it up fairly quickly. I’ve had a look around for similar requests however haven’t been able to find suitable answers or anything I can understand / manipulate to work correctly.
Any help is greatly appreciated.
This blog post should help you out! Effectively you need a enum converter.
To convert an enum to a list use the following code:-