.

Using a Timer (DispatcherTimer) in WPF

var dispatcherTimer = new System.Windows.Threading.DispatcherTimer();
dispatcherTimer.Tick += new EventHandler(dispatcherTimer_Tick);
dispatcherTimer.Interval = new TimeSpan(0,5,0);
dispatcherTimer.Start();

private void dispatcherTimer_Tick(object sender, EventArgs e)
{
  // your code goes here
}

What's your thoughts on this?

*

Protected by WP Anti Spam