The text of this article is not in this database — only its details are. Read it on the old site: Timer In WPF
21 Comments
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment.
The text of this article is not in this database — only its details are. Read it on the old site: Timer In WPF
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment.
Pravin NimbalkarPosted Jun 3, 2019, 12:39 AM
It doesn't work code!
Divya BediPosted Mar 5, 2018, 7:48 AM
How do I make it so when I click the button, the time prints rather than it printing every one second?
Xiao ZengPosted Apr 27, 2015, 8:18 AM
You didnt explain what the interval does. that make this tutorial useless really.
Scott SmithPosted Feb 13, 2015, 4:26 PM
This worked perfectly. I am liking WPF more than ever.
Lucio MenciPosted Dec 23, 2014, 11:59 AM
This is orrible: listBox1.Items.Add(DateTime.Now.Hour.ToString() + ":" + DateTime.Now.Second.ToString()); you should write listBox1.Items.Add(DateTime.Now.ToString("HH:mm:ss"));
Reg GamaloPosted Jul 24, 2013, 5:48 AM
Great work! Help me save my time...
SuneditedPosted Jan 9, 2013, 10:46 AMEdited Jan 9, 2013, 10:48 AM
that's great! by the way, your code [ listBox1.Items.Add(DateTime.Now.Hour.ToString() + ":" +DateTime.Now.Second.ToString()); ] should be changed to [ listBox1.Items.Add(DateTime.Now.Minute.ToString("D2") + ":" + DateTime.Now.Second.ToString("D2")); ]
AminePosted Nov 28, 2012, 9:28 AM
It doesn't work !
Amol VitekarPosted Sep 3, 2012, 6:13 AM
Helped me.
mmaPosted Aug 6, 2012, 1:15 PM
You have been such a big help to me!...I'm just a beginner learning by myself (15 years old)... Thank you sooo much for your help!
Shuvro PallPosted Jul 12, 2012, 4:11 AM
good one
Shuvro PallPosted Jul 12, 2012, 4:11 AM
good one
NobodyPosted Nov 11, 2011, 7:52 PM
hey i saw the sample but it is not i wanted. I do not want the timer to be open in another window when i run the program.How do i actually add it into my game without displaying the countdown of the time? Like those normal game, i want to display it at the top right hand corner and from 60seconds counting down to 0 second. can u help?
Jisss shyamPosted Aug 27, 2011, 3:55 AM
Its a very simple and good article for those who try to implement timers in there WPF project.. thanks a lot..
jay aignerPosted Nov 1, 2010, 1:58 PM
I get this error when I try to compile: Error 1 The type 'System.Windows.Markup.IQueryAmbient' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Xaml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=xxxx'. C:\Users\xxxx\Downloads\DispatchTimerSampleInCS\DispatchTimerSampleInCS\DispatchTimerSampleInCS\App.xaml.cs 13 26 DispatchTimerSampleInCS
Abdel MantiPosted Feb 10, 2010, 6:38 AM
Mahesh thank you for al this samples, i have learnt a lot. do you have more video whit samples. Keep up the good working. Greetings Abdel Manti [email protected]
sergio mtzPosted Dec 7, 2009, 12:35 AM
Gracias u save my live!!!! thankuuuuu!!!!