I'm having a user control (referred to as 'parent') which dynamically adds or removes other controls ('child').
The parent maintains a HelpProvider object that is supposed to be queried for help strings associated which controls contained in child ('subchild'). The subchild controls are not accessible directly, so I am planning to provide child with some method for letting child populate the HelpProvider object (e.g. public void InstallHelpProvider(HelpProvider)). So, when child is dynamically added to parent, parent will call InstallHelpProvider on the child before installing the control.
I am not fully aware of the HelpProvider internals, but I guess it will maintain a map for the controls being installed. Accordingly, I would like to remove entries from the parent's help provider when a child control is removed from parent (and if it's just for the sake of not wasting system ressources).
HelpProvider has a public method ResetShowHelp(Control) which I assume to do the job. However, MSDN says that this method is infrastructure and not inteded to be used directly.
Did anyone use this method anyway? Or maybe there is another (intended) way how to do this? Or maybe HelpProvider does not work well with my design?
Regards, jerb