Skip to content

net90_PropertyGridHelpers.Attributes_LocalizedEnumTextAttribute_LocalizedEnumTextAttribute

dparvin edited this page Jul 5, 2025 · 11 revisions

LocalizedEnumTextAttribute constructor

Specifies a localized text representation for an enum field or property, retrieving its display text from a resource file at runtime.

public LocalizedEnumTextAttribute(string resourceKey)
parameter description
resourceKey The key identifying the localized text in the resource file.

Remarks

Use this attribute to replace raw enum field names with user-friendly, localized display text based on a resource key.

Examples

public enum Status
{
    [LocalizedEnumText("PendingApproval")]
    Pending,

    [LocalizedEnumText("Approved")]
    Approved,

    [LocalizedEnumText("Rejected")]
    Rejected
}

See Also

Clone this wiki locally