I have a component that implements IExtenderProvider and add a property, say
"ID", to some controls, say a Button. I have added a type converter to this
property and this type converter offers a drop down list of possible values,
by overriding GetStandardValuesSupported and GetStandardValues. But in order
to populate the list of values, I need to get a reference to the my
component instance that provides the extended property. I don't see how can
I retrieve this from the ITypeDescriptorContext. The context is exposing the
'Button' that has the extended property, but no the component instance that
provides this extended property.
TIA,
~ Remus
Remus Rusanu [MSFT] - 26 Jan 2006 03:09 GMT
Found it. The Provider property on the ExtenderProvidedPropertyAttribute in
the Attributes collection of the context.PropertyDescriptor.
>I have a component that implements IExtenderProvider and add a property,
>say "ID", to some controls, say a Button. I have added a type converter to
[quoted text clipped - 8 lines]
> TIA,
> ~ Remus
Dira - 27 Jan 2006 08:38 GMT
O!
This is much better than the code i used:
Remus Rusanu [MSFT] schrieb:
> Found it. The Provider property on the ExtenderProvidedPropertyAttribute in
> the Attributes collection of the context.PropertyDescriptor.
[quoted text clipped - 11 lines]
> > TIA,
> > ~ Remus