How can I set a timer to run from code? I can't find any control named timer
.
What are the steps needed to do this?
How can I set a timer to run from code? I can't find any control named timer
.
What are the steps needed to do this?
You're looking for the DispatcherTimer
class.
DispatcherTimer dt = new DispatcherTimer();
dt.Interval = TimeSpan.FromSeconds(10);
dt.Tick += delegate { ... };
dt.Start();