net90_PropertyGridHelpers.Attributes_LocalizedCategoryAttribute_LocalizedCategoryAttribute - dparvin/PropertyGridHelpers GitHub Wiki
Attribute for specifying a localized category name for a property or event.
public LocalizedCategoryAttribute(string resourceKey)
parameter | description |
---|---|
resourceKey | The key used to retrieve the localized category name from the resource file. |
This attribute allows category names displayed in property grids to be localized by retrieving the category name from a resource file. If your class has a ResourcePathAttribute
applied to it, the resource key will be looked up in the resource file specified by that attribute.
[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;
}
}
- class LocalizedTextAttribute
- class LocalizedCategoryAttribute
- namespace PropertyGridHelpers.Attributes
- assembly PropertyGridHelpers