KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I basically want a dispatcher timer object to only execute once. So I have the basic code: DispatcherTimer dispatcherTimer = new DispatcherTimer(); dispatcherTimer.Tick += new EventHandler(dispatcherTimer_Tick); dispatcherTimer.Interval = new TimeSpan(0, 0, 4); dispatcherTimer.Start(); Then inside the click event: private void dispatcherTimer_Tick(object sender, EventArgs e) { this.Visibility = System.Windows.Visibility.Visible; // Now stop timer execution.. or kill the timer object } How can I stop the timer or kill off the object after this execution?
Tags (comma-separated)
Save Edits
Cancel