OK, so I have a user control which uses values from an underlying business logic class. I need some way for the user control to listen to the class and fire when certain methods are called / values are updated on the BL class.
At a high level, what would be the best way to do this? I know I’d need some form of event in the BL class with a listener in my user control but just wondering the best way to go about it if anyone has any suggestions??
The class that should be listen to has to implement the
INotifyPropertyChangedinterface and the usercontrol has to subscribe to it. Let me show you a short simple sample. Here is a class that has a property and notifiy changes to it:Your usercontrol should subscribe the PropertyChange event and will be notified on every change.