No overload for 'method' matches delegate 'System.EventHandler' No overload for 'method' matches delegate 'System.EventHandler' wpf wpf

No overload for 'method' matches delegate 'System.EventHandler'


The signature of the event-handler method isn't compatible with the delegate type.

Subsribers to the DispatcherTimer.Tick event must be of the EventHandler delegate type, which is declared as:

public delegate void EventHandler(object sender, EventArgs e);

Try this instead:

void OnTimed(object sender, EventArgs e){   ...}


If you using Windows phone 8.1 then you need the following

private void OnTimed(object sender, object e) {      // You Code Here }


Method OnTimed has to declared like this:

 private void OnTimed(object sender, EventArgs e) {     // Do something }