1 声明 2 System.Windows.Threading.DispatcherTimer _MessageControler; 3 4 //刷新 5 _MessageControler = new System.Windows.Threading.DispatcherTimer(); 6 _MessageControler.Interval = new TimeSpan(0, 0, 600); 7 _MessageControler.Tick += new EventHandler(_MessageControler_Tick); 8 _MessageControler.Start(); 9 10 11 定时执行的方法:_MessageControler_Tick 12 13 private void _MessageControler_Tick(object sender,EventArgs e) 14 { 15 //具体方法 16 }
silverlight 定时器 System.Windows.Threading.DispatcherTimer,布布扣,bubuko.com