-
Notifications
You must be signed in to change notification settings - Fork 1
net472_PropertyGridHelpers.Attributes_ResourcePathAttribute_Get
dparvin edited this page Jan 11, 2026
·
2 revisions
Resolves the most appropriate ResourcePathAttribute for the given context and usage.
public static ResourcePathAttribute Get(ITypeDescriptorContext context,
ResourceUsage resourceUsage = ResourceUsage.All)| parameter | description |
|---|---|
| context | The descriptor context containing the property and instance metadata. |
| resourceUsage | The type of resource being requested (e.g., strings, images). |
The best-matching ResourcePathAttribute, or null if none found.
| exception | condition |
|---|---|
| ArgumentException | Thrown if resourceUsage is None. |
The method checks the following in order:
- Property-level attributes on context.PropertyDescriptor.PropertyDescriptor
- Type-level attributes on context.Instance.GetType().Instance.GetType()
- enum ResourceUsage
- class ResourcePathAttribute
- namespace PropertyGridHelpers.Attributes
- assembly PropertyGridHelpers