The line using System.Windows.Documents;
produces the following compile error:
The type or namespace name 'Documents' does not exist in the namespace 'System.Windows' (are you missing an assembly reference?)
I tried finding the assembly in the "add references..." dialog, but System.Windows.Documents
was not listed, as it usually is when this error occurs.
Which assembly do I need to add for this using
clause?
Classes in this namespace are contained in the Presentation Framework
assembly, and this is the reference you need to add.
This assembly also provides classes for these namespaces:
System.Windows.Documents
System.Windows.Media
System.Windows.Media.Animation
System.Windows.Shell
Note that assemblies (physical collections of classes) do not provide namespaces (logically organization of classes) per se, they contain classes which have their own classification in namespaces. So it is possible for an assembly to "contain" many namespaces, and it is possible for a namespace to appear in many assemblies. This explains why it is not listed on the MSDN page for System.Windows.Documents
(Thanks CodeCaster and Damien_The_Unbeliever)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With