Skip to content

net472_PropertyGridHelpers.Attributes_ResourcePathAttribute_Get

dparvin edited this page Jan 11, 2026 · 2 revisions

ResourcePathAttribute.Get method

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).

Return Value

The best-matching ResourcePathAttribute, or null if none found.

Exceptions

exception condition
ArgumentException Thrown if resourceUsage is None.

Remarks

The method checks the following in order:

  1. Property-level attributes on context.PropertyDescriptor.PropertyDescriptor
  2. Type-level attributes on context.Instance.GetType().Instance.GetType()

See Also

Clone this wiki locally