I am creating an app which needs to use the Visual State Manager, but when I want to use it, I get the following error:
Visual State Manager is not supported in a WPF application.
I tried to use the code snippet from this question: VisualStateManager is not supported in a WPF project, but then it says, that the Visual State Manager is not in the namespace of System.Windows.
I am using .NET Framework 3.5 to use the app on Windows 7 as well...
Does somebody have an idea how to solve this?
Thanks!
CodePudding user response:
If you want to use the VisualStateManager
class in your WPF application, you must target the .NET Framework 4.0 or later.
Since the .NET Framework versions 4.5.2, 4.6, and 4.6.1 will reach end of support on April 26, 2022 and versions between 4.0 and 4.5.1 are already out of official support, any new application that you develop should target .NET Framework 4.6.2 or later.
.NET Framework 4.6.2 and later versions are fully compatible with Windows 7 SP1.