Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is System.Windows.Threading.DispatcherTimer?

Tags:

.net-3.5

Gotta be getting close to a long weekend.... I'm trying to create a DispatchTimer. I found some sample code but can't run it due to a missing namespace.

I have the namespace, System.Windows.Threading, but in which assembly can I find it? I tried System, System.Windows... nada.

Thanks!

like image 765
DenaliHardtail Avatar asked Dec 23 '09 19:12

DenaliHardtail


People also ask

How do I dispose of DispatcherTimer?

You cannot dispose DispatcherTimer object. It doesn't implement IDisposable interface. You cannot explicit kill (free, destroy) objects in managed world. If you don't need the timer object any more, disable it and set reference to it to null.


2 Answers

It is in System.Windows.Threading, but you need to be sure you are referencing the WindowsBase.dll assembly as well.

like image 102
quentin-starin Avatar answered Feb 13 '23 00:02

quentin-starin


The msdn docs say it's in WindowsBase.dll . http://msdn.microsoft.com/en-us/library/system.windows.threading.dispatchertimer.aspx

like image 35
John Boker Avatar answered Feb 12 '23 23:02

John Boker