OO design problem (mainform and user control)

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
 
B

Bryan Phillips

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top