Search code examples
c#wpfrouted-events

WPF Firing the RoutedEvents with a Delay


I am gathering all the routed events fired for the MouseRightDownButton and storing them in a Queue. I have the Sender object as well as the RoutedEventArgs.

Now, I need to fire those events one by one and with a little pause. I also want to update the UI as I fire each event.

Do this require the Timer class?


Solution

  • Yes it will require a timer of some sort. I would check out the DispatcherTimer class if you need to update objects on the UI.