System.Windows.Threading.DispatcherTimer dispatcherTimer = new System.Windows.Threading.DispatcherTimer(); dispatcherTimer.Tick += new EventHandler(dispatcherTimer_Tick); dispatcherTimer.Interval = new TimeSpan(0,0,1); dispatcherTimer.Start(); private void dispatcherTimer_Tick(object sender, EventArgs e) { // code goes here }
http://stackoverflow.com/questions/5410430/wpf-timer-like-c-sharp-timer