views:

783

answers:

1

I'm working on extending the errorprovider to the propertygrid and treeview controls. I found a very helpful post at: Example detailing how to add the errorprovider to a propertygrid, and it works very well. My question is how did the author know that IPropertyValueUIService is the interface that the propertygrid uses to display the icon and tooltip. I have used Reflector to dissassemble the propertygrid and IPropertyValueUIService and I don't see any relationship.

This is for my own edification as a programmer as well as trying to extend the errorprovider to a treeview.

Thanks in advance, dhysong

+2  A: 

I'm guessing partly from the documentation?

Or from reflector; find IPropertyValueUIService, press Ctrl+r and expand "Used By", and you can see how it is used by PropertyGridInternal.PropertyDescriptorGridEntry.

Marc Gravell
Are you the same Marc Gravell that posted that explanation? I see that MSDN documentaton on IPropertyValueUIService is pretty clear, but I don't see how I get to IPropertyValueUIService from the propertygrid documentation.
dhysong
PropertyGrid is primarily a consume of System.ComponentModel and PropertyDescriptor; the linked documentation discusses that. The fact is that System.ComponentModel is very large, and even though it is (generally) well documented, there are some gaps - it is **possible** this link is in a gap. Or maybe it is there and we just haven't seen it.
Marc Gravell
I was wrong. I can't get to IPropertyValueUIService from propertygrid in reflector. I do see that "used by" has PropertyGrid + PropertyGridServiceProvider, so I can infer that PropertyGridServiceProvider implements IPropertyValueUIService. Many thanks Marc for the initial code and this explanation as well.
dhysong