net90_PropertyGridHelpers.Attributes_LocalizedDescriptionAttribute - dparvin/PropertyGridHelpers GitHub Wiki

LocalizedDescriptionAttribute class

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

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

Public Members

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

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