Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VisualStateManager present both in WPF Toolkit and PresentationFramework - How to resolve

I have to use VisualStateManager class in my WPF window, but as I have referenced the assemblies of both WPF Toolkit and PresentationFramework.dll in my project, C# is not able to resolve the VisualStateManager class and gives the compile error like - "The type exists in both 'PresentationFramework.dll' and 'WPFToolkit.dll'" and I am not able to proceed.

How to tell C# compiler to use VisualStateManager class from either of the assemblies and get the project to compile successfully?

like image 926
VSS Avatar asked Jan 20 '12 11:01

VSS


1 Answers

Since the .NET4.0, the WPF Toolkit has been included in the framework. You should be able to remove WPF Toolkit, update some namespaces and the application still compile.

This is an approach we have taken in a project where we recently upgraded from .NET3.5 to .NET 4.0

Best regards,

like image 62
Dr. Andrew Burnett-Thompson Avatar answered Nov 07 '22 11:11

Dr. Andrew Burnett-Thompson