Hi I'd like to use System.Windows.Data.IValueConverter, but when I try to add a reference to System.Windows.Data in VS2010, I only see System.Windows.Forms and System.Windows.Presentation. What am I missing? I'm using .NET 3.5 (not the client version), and I think the library should exist for that version. Switching my project to .NET 4.0 didn't help. Googling didn't turn up any people experiencing this problem. TIA.
Although IValueConverter
is in the System.Windows.Data
namespace, it's in the PresentationFramework
assembly. It's worth being aware of the difference between the two concepts. An assembly is the unit of deployment in .NET, but a single assembly can have types in multiple namespaces, and multiple assemblies can contribute types to the same namespace.
In practical terms, assemblies are what you add references to at the project level, and namespaces are what you have using
directives for at the top of your source file :)
When you're not sure where a type is, in terms of either its namespace or its assembly, consult MSDN (such as the link above) which specifies both, like this:
Namespace: System.Windows.Data
Assembly: PresentationFramework (in PresentationFramework.dll)
System.Windows.Data namespace comes from PresentationFramework.dll . Have you included it in your application (add new reference and so on)?
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