4

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

dhysong
  • 1,011
  • 1
  • 14
  • 29

1 Answers1

3

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
  • 1,026,079
  • 266
  • 2,566
  • 2,900
  • 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 Jul 21 '09 at 19:43
  • 1
    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 Jul 21 '09 at 19:49
  • 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 Jul 21 '09 at 20:03