Hi Marek
No, there is no any mechanism that will automate that for you. The only
mechanism that WindowsForms supports are events. But each control that wants
to be notified needs to hook on that event.
The easiest way I believe (ofcourse it is not a painkiller and might be not
suitable for some projects) is to declare helper serivice class that
exposes a static public events and respective public static raise methods.
This way the events are accessible to any object that wants to hook on them
and any object can raise some of those events using the RaiseXXX methods if
wants to notify the others. Over simmilar pattern VS, for example, is built.
Ofcourse they have more powerful and flexible service system (with service
containers and stuff) rather than static events.
--
HTH
Stoitcho Goutsev (100) [C# MVP]
"Marek" <ma**************@sbcglobal.net> wrote in message
news:ZS******************@newssvr17.news.prodigy.c om...
Hi,
I have a Form with many UserControls on it. Some of the UserControls
contain other Controls.
What is the best way of notifying each of the nested controls about an
event that has occured on one of them?
Are there any mechanisms for broadcasting messages down the owning chain?
Mark