OO design problem (mainform and user control)

  • Thread starter Thread starter Tarscher
  • Start date Start date
T

Tarscher

Hi all,

I have a main form that has a user control. I need access to a control
when an event is fired on the user control. Since the main control
knows the user control but not vice versa I cannot do this.

Is there a way I can pass a variable to the main control from the user
control? how is this best done in c#

Thanks,
Stijn
 
You should look into using the Composite UI Application Block since it
already contains patterns for this situation. It will allow you to
"publish" and "subscribe" to events without having to manually connect
event handlers.

http://www.codeplex.com/smartclient
 
Back
Top