-
Notifications
You must be signed in to change notification settings - Fork 1
net90_PropertyGridHelpers.Attributes_LocalizedEnumTextAttribute
dparvin edited this page Jan 11, 2026
·
15 revisions
Specifies a localized text representation for an enum field or property, retrieving its display text from a resource file at runtime.
[AttributeUsage(AttributeTargets.Enum | AttributeTargets.Property | AttributeTargets.Field)]
public class LocalizedEnumTextAttribute : LocalizedTextAttribute| parameter | description |
|---|---|
| resourceKey | The key identifying the localized text in the resource file. |
| name | description |
|---|---|
| LocalizedEnumTextAttribute(…) | Specifies a localized text representation for an enum field or property, retrieving its display text from a resource file at runtime. |
| static Get(…) | Retrieves the LocalizedEnumTextAttribute applied to the given value, if present. (3 methods) |
Use this attribute to replace raw enum field names with user-friendly, localized display text based on a resource key.
public enum Status
{
[LocalizedEnumText("PendingApproval")]
Pending,
[LocalizedEnumText("Approved")]
Approved,
[LocalizedEnumText("Rejected")]
Rejected
}- class LocalizedTextAttribute
- namespace PropertyGridHelpers.Attributes
- assembly PropertyGridHelpers
- LocalizedEnumTextAttribute.cs