I am trying to implement the Async Progress Pattern to my program. But I am stuck at a rather embarassing point: I am unable to assign the event Handler.
My code looks like this: The event is handeld in an extra window:
public ProgressReportViewModel(IWindowManager windManager, Progress<ProgressReport> progressReport)
{
this.ProgressReport = progressReport;
this.ProgressReport.ProgressChanged += HandleProgressChanged;
}
public void HandleProgressChanged(ProgressReport report)
{
// do stuff. }
If I am trying to compile, I get the following error: No overload for 'HandleProgressChanged' matches delegate 'System.EventHandler'
Why does this error occur? Do I have a flaw in my understanding of Event handlers?