Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

System.Windows.Threading not working

I am trying to use using System.Windows.Threading; but it gives me

The type or namespace name 'Threading' does not exist in the namespace 'System.Windows`.

I have the latest version of .NET.


2 Answers

It's in WindowsBase.dll, after add the reference, it works!

(if you don't know how to add reference, see this tutorial.)

enter image description here

like image 182
yu yang Jian Avatar answered Apr 21 '26 06:04

yu yang Jian


Please make sure you've added a reference to WindowsBase.dll to your project and then you should be good to go. have a look at - https://msdn.microsoft.com/en-us/library/system.windows.threading.dispatchertimer%28v=vs.110%29.aspx

If you're still having trouble please attach your .csproj file.

like image 28
Roman Ambinder Avatar answered Apr 21 '26 06:04

Roman Ambinder



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!