Hi,
I've written a simple ExtenderProvider that provides a string property
(Let's call it CustomStringProperty) to all the buttons on a form. The
ExtenderProvider itself is placed on a base form (It is protected, so
derived forms will inherit it's functionality) and provides the
CustomStringProperty to all forms derived from it.
It's canonical and works well. It allows the values to be assigned
during design time. Thereby easing the development of new forms and
insuring that all the buttons on new forms (that derive from the base
form containing the ExtenderProvider) have the CustomStringProperty.
Now I'm writing a small external tool that is attempting to extract
these CustomStringProperty(s) through reflection and log their value
in a database.
However, It's my understanding that the values of the
CustomStringProperties are assigned during the InitializeComponent()
method call of the associated forms (which to my knowledge doesn't get
executed during reflection). And I don't think that the properties
extended by the ExtenderProvider show up in the fieldinfo of the
buttons themselves, rather that you must go throught the
ExtenderProvider during runtime. Am I wrong?
Any advice would be welcome.
Thanks
Jason