andrew4582

Dispatcher Timer WPF

Jun 12th, 2013
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.37 KB | None | 0 0
  1.     var delayTimer = new System.Windows.Threading.DispatcherTimer(System.Windows.Threading.DispatcherPriority.Input);
  2.     delayTimer.Interval = new TimeSpan(0, 0, 0, 0, 200); // milliseconds
  3.     delayTimer.Tick += new EventHandler((arg1, arg2) =>
  4.     {
  5.         try
  6.         {
  7.  
  8.         }
  9.         finally
  10.         {
  11.             (arg1 as System.Windows.Threading.DispatcherTimer).Stop();
  12.         }
  13.     });
  14.     delayTimer.Start();
Advertisement
Add Comment
Please, Sign In to add comment