Groups | Blog | Home
all groups > dotnet windows forms > march 2007 >

dotnet windows forms : OO design problem (mainform and user control)


Tarscher
3/7/2007 6:59:14 AM
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
Bryan Phillips
3/7/2007 8:50:01 PM
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


--
Bryan Phillips
MCSD, MCDBA, MCSE
Blog: http://bphillips76.spaces.live.com



[quoted text, click to view]
AddThis Social Bookmark Button