How should I resolve the issue?
The suggested alternatives do not work either.
Error CS1545 Property, indexer, or event 'DispatcherTimer.Tick' is not supported by the language; try directly calling accessor methods 'DispatcherTimer.add_Tick(EventHandler)' or 'DispatcherTimer.remove_Tick(EventRegistrationToken)'
_timer = new DispatcherTimer();
_timer.Tick += Timer_Tick;
_timer.Interval = new TimeSpan(0, 0, 1);