Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1078
  • Last Modified:

How to capture Winform UserControl Events without using Delegates

I have 2 UserControls on a Winforms Main form.  I need to capture events from one usercontrol without using delegates and events, possibly with an Observer Pattern mechanism, but how to do this?

I don't want the Mainform to be aware of the communication mechanism between usercontrols, and I can't require that either usercontrol is listening to the other or guarentee that both Usercontrols are even loaded.

Anybody have exprience with the Observer pattern or know some other way to do this?
0
tiote
Asked:
tiote
1 Solution
 
JackOfPHCommented:
try this link...

This might give you an idea...

http://msdn.microsoft.com/en-us/magazine/dd252944.aspx
0
 
tioteAuthor Commented:
Good call, I was unaware of the ObservableCollection class.  Using the link you sent I found some additional code that I can use to implement the notifications.  thanks for the help.
0
 
svasudevanCommented:
Thank you so much; useful link
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now