I'd like to do this: http://stackoverflow.com/a/17405771/63973 I have no idea whether I should include that link's content here for future viewing. Basically, I have some PropertyGridItems for enum values, but the real names of the enum values are not for human consumption. For example, one is oz_avdp but the customer doesn't want the information about which specific ounce specification is used; it should be displayed as oz.
The documentation for EnumListBox says:
By default, the enumeration values will be displayed using a string-representation of the defined field names. A custom TypeConverter can be defined that will look for a DescriptionAttribute defined on the fields, and use that in place of the field name. This allows user friendly strings to be used and also supports localization.
I don't know whether PropertyGridItem uses EnumListBox for enums, but even if so I'm not sure this is the way for me to go. My enums are deep in the model, and it doesn't seem appropriate to use a System.ComponentModel type there. Then again I've already disregarded that concern in another case for a big gain in terms of less code.
What should my approach be here?