问题
When answering another question I started to wonder how I could Add new properties to all controls in a form just like the ToolTip-control does.
For example I could use that to Add a "IsDirty"-flag to all textboxes just by adding the component to the form and it would handle this for every textbox.
When adding the tooltip-control to the form all controls magically gets a new property "Tooltip on tooltip1" that can be set both programatically and in design view.
I want to be able to do my own enhancer like that.
回答1:
It's an Extender Provider.
来源:https://stackoverflow.com/questions/338924/how-does-the-tooltip-control-enhance-all-controls-on-the-form-with-a-new-propert