so I want to populate a combobox items source with the contents on an enum (and obviously retrieve the values later on).
Populating works fine with either of the two following approaches but neither matches what I want to achieve.
comboBox.ItemsSource = Enum.GetValues(typeof(VirtualKey));
I can retrieve the values without issue using a simple (VirtualKey)comboBox.SelectedItem. The problem is, the names in the dropdown menu are all unreadable.
comboBox.ItemsSource = Enum.GetNames(typeof(VirtualKey));
Displays the names as intended but I can't retrieve the value like with the other instruction.
Any ideas how to solve the situation?