Implement IValueConverter in class library project

c#, ivalueconverter, wpf

Solution

You need to add a reference to PresentationFramework.dll, that's where `IValueConverter` is actually defined.

Looking at the documentation you can find that information at the top:

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

Problem

I have a solution with about 12 projects, one is set as the startup project and this contains the main window. At the moment all of my `IValueConverter`s are inside this project. I now want to move them into a separate project that will hold only converters. This way I will be able to reuse them across all the projects, not just the main window. - I have created a new project (class library) - I have imported WindowsBase - I have Included a reference to System.Windows.Data - I am using Visual Studio 2010 Express with .NET 4 I get the error: "Error 3 The type or namespace name 'IValueConverter' could not be found (are you missing a using directive or an assembly reference?) "

Original source

Related problems