net90_PropertyGridHelpers.Attributes_DynamicPathSourceAttribute_DynamicPathSourceAttribute - dparvin/PropertyGridHelpers GitHub Wiki
Specifies that another property dynamically provides the path to the resources used to display this property in the PropertyGrid.
public DynamicPathSourceAttribute(string pathPropertyName)
parameter | description |
---|---|
pathPropertyName | The name of the property containing the resource path. |
Typically used for properties of an Enum type in a PropertyGrid, where the enum values are shown in a dropdown and mapped to resources that provide user-friendly display text. The referenced property contains the path to these resources, allowing the user of the property to specify which resource set to use for what is displayed.
[DynamicPathSource(nameof(ResourcePath))]
public MyEnum DisplayProperty { get; set; }
public string ResourcePath { get; set; } = "MyNamespace.Resources";
- class DynamicPathSourceAttribute
- namespace PropertyGridHelpers.Attributes
- assembly PropertyGridHelpers