Solved

How to capture Winform UserControl Events without using Delegates

Posted on 2009-05-15
3
1,065 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This very simple solution applies to a narrow cross-section of the "needs to close" variety. In this case, the full message in Event Viewer was in applog, Event ID 1000: Faulting application iexplore.exe, version 8.0.6001.18702, faulting module …
Many companies are making the switch from Microsoft to Google Apps (https://www.google.com/work/apps/business/). Use this article to learn more about what Google Apps has to offer and to help if you’re planning on migrating to Google Apps. It is …
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
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 …

947 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

17 Experts available now in Live!

Get 1:1 Help Now