net90_PropertyGridHelpers.Attributes_LocalizedDisplayNameAttribute - dparvin/PropertyGridHelpers GitHub Wiki

LocalizedDisplayNameAttribute class

Specifies a localized display name for a property, event, or other member in a class.

[AttributeUsage(AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Event)]
public class LocalizedDisplayNameAttribute : LocalizedTextAttribute
parameter description
resourceKey The key identifying the localized string in the resource file.

Public Members

name description
LocalizedDisplayNameAttribute(…) Specifies a localized display name for a property, event, or other member in a class.
static Get(…) Gets the LocalizedDisplayNameAttribute from the specified context.

Remarks

Initializes a new instance of the LocalizedDisplayNameAttribute class.

Examples

[ResourcePath(nameof(TestControl))]
[TypeDescriptionProvider(typeof(LocalizedTypeDescriptionProvider))]
public partial class TestControl : UserControl
{
    [LocalizedCategory("Category_Layout")]
    [LocalizedDescription("Description_Scrollbar")]
    [LocalizedDisplayName("DisplayName_Scrollbar")]
    [Editor(typeof(FlagEnumUIEditor<EnumTextConverter<ScrollBars>>), typeof(UITypeEditor))]
    [TypeConverter(typeof(EnumTextConverter<ScrollBars>))]
    [DefaultValue(ScrollBars.None)]
    [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
    [EditorBrowsable(EditorBrowsableState.Always)]
    [Bindable(true)]
    public ScrollBars Scrollbars
    {
        get => _Scrollbars;
        set => _Scrollbars = value;
    }
}

See Also

⚠️ **GitHub.com Fallback** ⚠️