Drahcir
Drahcir

Reputation: 11972

Implement IValueConverter in class library project

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 IValueConverters 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 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?) "

Upvotes: 7

Views: 4853

Answers (2)

Daniel Hilgarth
Daniel Hilgarth

Reputation: 174309

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)

Upvotes: 20

DHN
DHN

Reputation: 4865

Please have a look here. I'm sure you're missing the library PresentationFramework.dll in your project.

Upvotes: 4

Related Questions