Skip to content

net472_PropertyGridHelpers.Attributes_LocalizedCategoryAttribute_LocalizedCategoryAttribute

dparvin edited this page May 25, 2025 · 10 revisions

LocalizedCategoryAttribute constructor

Initializes a new instance of the LocalizedCategoryAttribute class.

public LocalizedCategoryAttribute(string resourceKey)
parameter description
resourceKey The key used to retrieve the localized category name from the resource file.

Remarks

The constructor fetches the localized category name using the specified resource key.

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

Clone this wiki locally