Yes, don't do it like that (I never managed to get that approach to work0. There is a much better approach you can use which I think is more re-usable. Use the [Description()] Attribute on your enum like this:
Public Enum Fruit
<Description("Juicy Oranges")>
Oranges
<Description("Crunchy Apples")>
Apples
Plums
End Enum
Then use a converter that retrieves description attributes from the bound object.
Public Class EnumDescriptionConverter
Implements IValueConverter
Private Function GetEnumDescription(enumObj As [Enum]) As String
Dim fieldInfo As FieldInfo = enumObj.[GetType]().GetField(enumObj.ToString())
Dim attribArray As Object() = fieldInfo.GetCustomAttributes(False)
If attribArray.Length = 0 Then
Return enumObj.ToString()
Else
Dim attrib As DescriptionAttribute = TryCast(attribArray(0), DescriptionAttribute)
Return attrib.Description
End If
End Function
Private Function IValueConverter_Convert(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.Convert
Dim myEnum As [Enum] = DirectCast(value, [Enum])
Dim description As String = GetEnumDescription(myEnum)
Return description
End Function
Private Function IValueConverter_ConvertBack(value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IValueConverter.ConvertBack
Return String.Empty
End Function
End Class
Then in your combo box set the datasource to your dataprovider and set the DisplayMemberPath to the converter.
Combobox XAML:
<combobox itemssource="{Binding Source={StaticResource deliciousFruits}}">
<combobox.itemtemplate>
<datatemplate>
<textblock text="{Binding Converter={StaticResource fruitImprover}}"></textblock>
</datatemplate>
</combobox.itemtemplate>
</combobox>