CommonLocalizableEnumConverter Class

Definition

The CommonLocalizableEnumConverter allows for the values of an Enum to be converted to localized strings based on the DisplayNameKey attribute applied to the individual items in the Enum.

public class CommonLocalizableEnumConverter : System.ComponentModel.EnumConverter
type CommonLocalizableEnumConverter = class
    inherit EnumConverter
Public Class CommonLocalizableEnumConverter
Inherits EnumConverter
Inheritance
CommonLocalizableEnumConverter

Examples

public enum ScriptModeOptions { [DisplayNameKey("CreateOnlyMode")] scriptCreateOnly, [DisplayNameKey("DropOnlyMode")] scriptDropOnly }

Constructors

CommonLocalizableEnumConverter(Type)

This constructor is the default constructor that would be used if this converter is placed on an Enum class directly and not via the abstraction through the LocalizedTypeConverter attribute on the containing class.

Methods

ConvertFrom(ITypeDescriptorContext, CultureInfo, Object)

Does the conversion from string to enum and the odd enum to enum. All others are passed on to the base

ConvertTo(ITypeDescriptorContext, CultureInfo, Object, Type)

Does the conversion from Enum to string and the odd string to string. All others are passed on to the base

GetStandardValues(ITypeDescriptorContext)

Returns the list of values for the list box in the property grid. If the ICommonDynamicVisible interface is defined then we call into that to get the manipulated values array. If not then we just return the list of values.

GetStandardValuesExclusive(ITypeDescriptorContext)
GetStandardValuesSupported(ITypeDescriptorContext)

Applies to