Hi,
I have a class which provides a custom event:
public delegate void ResultEvent(bool result);
public class Service : INotifyPropertyChanged
{
public event ResultEvent Result;
}
Two other objects have a refernce to this like this:
public partial class SomeRandomClass
{
private Service service;
public SomeRandomClass()
{
this.InitializeComponent();
service = new Service();
service.Result += new ResultEvent(service_Result);
}
}
The problem is, only the last object which creates a new object of "Service" seems to recognize if the event is dispatched. If I do something with the "Service" on previoulsy generated objects, so that the event has to be dispatched, the event will be raised in the "Service"-object, but the handler will not be called.
Anybody has an idea what may be my problem?