-
Notifications
You must be signed in to change notification settings - Fork 1
net90_PropertyGridHelpers.Attributes_LocalizedDescriptionAttribute_LocalizedDescriptionAttribute
dparvin edited this page May 25, 2025
·
10 revisions
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. |
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
[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 LocalizedDescriptionAttribute
- namespace PropertyGridHelpers.Attributes
- assembly PropertyGridHelpers