Solved

How to capture Winform UserControl Events without using Delegates

Posted on 2009-05-15
3
1,064 Views
Last Modified: 2012-12-20
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
Comment
Question by:tiote
3 Comments
 
LVL 15

Accepted Solution

by:
JackOfPH earned 500 total points
ID: 24400828
try this link...

This might give you an idea...

http://msdn.microsoft.com/en-us/magazine/dd252944.aspx
0
 

Author Closing Comment

by:tiote
ID: 31582143
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
 

Expert Comment

by:svasudevan
ID: 38711699
Thank you so much; useful link
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

We were having a lot of "Heartbeat Alerts" in our SCOM environment, now "Heartbeat" in a SCOM environment for those of you who might not be familiar with SCOM is a packet of data sent from the agent to the management server on a regular basis, basic…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now