Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I can't find System.Windows.Media namespace [duplicate]

I can't seem to find System.Windows.Media reference for my C# project. It is not there at all!

Help and tips? enter image description here

like image 502
Khiem-Kim Ho Xuan Avatar asked Dec 07 '25 23:12

Khiem-Kim Ho Xuan


2 Answers

System.Windows.Media is a namespace - most of the types within it are in the assembly PresentationFramework.dll or PresentationCore.dll.

You should look up whichever type you're interested in (via MSDN), and check which assembly it's in. You've got to distinguish between namespaces and assemblies - they're different concepts. You add a reference to an assembly as part of the project configuration, but specify the namespace in your source code (usually via a using directive).

like image 106
Jon Skeet Avatar answered Dec 09 '25 13:12

Jon Skeet


System.Windows.Media is not a reference, it is a namespace.

This namespace belongs on PresentationFramework.dll or PresentationCore.dll

Namespace:  System.Windows.Media
Assembly:  PresentationFramework (in PresentationFramework.dll)

You can add these dll files in your current project and then you can use it via using.

using System.Windows.Media;
like image 42
Soner Gönül Avatar answered Dec 09 '25 11:12

Soner Gönül