net90_PropertyGridHelpers.Attributes_LocalizedDescriptionAttribute_LocalizedDescriptionAttribute - dparvin/PropertyGridHelpers GitHub Wiki

LocalizedDescriptionAttribute constructor

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

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

Remarks

This attribute holds the key to the resource entry to get the description text from a resource file, allowing descriptions to be localized. Apply this attribute to a member, providing the resource key. It is expected to work together with the ResourcePathAttribute to figure out where to get the resource string from

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** ⚠️