Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the namespace for DispatcherTimer class?

Tags:

c#

Ok! This sounds like a "Let Me Google That For You", well I did and here is the MSDN link:

http://msdn.microsoft.com/en-us/library/system.windows.threading.dispatchertimer.aspx

so in MSDN it says it is System.Windows.Threading but my VS IDE is giving error on it.

What is going on? I want be able to use DispatcherTimer class.

like image 434
Bohn Avatar asked Nov 09 '11 15:11

Bohn


2 Answers

The MSDN page also says:

Assembly: WindowsBase

Did you reference this assembly? Is your project even a WPF project? (WindowsBase is a WPF library.)

like image 107
Heinzi Avatar answered Sep 28 '22 04:09

Heinzi


You need to add a reference to WindowsBase.dll. It's a WPF assembly.

enter image description here

like image 39
jason Avatar answered Sep 28 '22 04:09

jason