silverlight计时器

引用using System.Windows.Threading;

DispatcherTimer dispatchertimer = new DispatcherTimer();//创建一个新的计时器
dispatchertimer.Interval = TimeSpan.FromSeconds(1);//每一秒钟发生一次
dispatchertimer.Tick += new EventHandler(dispatchertimer_Tick);//dispatchertimer_Tick:一个事件,到一秒钟发生的事件
dispatchertimer.Start();//开始

原文地址:https://www.cnblogs.com/MyBeN/p/3309771.html