The name “Interaction” does not exist in the namespace “http://schemas.microsoft.com/expression/2010/interactivity”

后端 未结 9 1976
花落未央
花落未央 2021-02-02 06:28

I\'ve used the System.Windows.Interactivity DLL in several projects without any problem. Now in my latest project I can\'t get it to work. I always get the following error:

9条回答
  •  囚心锁ツ
    2021-02-02 06:44

    1. Remove any project reference to Microsoft.Expression.Interactions and System.Windows.Interactivity.

    2. Install through Nuget the newer Microsoft.Xaml.Behaviors.Wpf, which replaces the aforementioned references, i.e. open the Package Manager console and type:

      Install-Package Microsoft.Xaml.Behaviors.Wpf ProjectName

    3. In the Xaml-files, replace the xmlns namespaces http://schemas.microsoft.com/expression/2010/interactivity and http://schemas.microsoft.com/expression/2010/interactions with http://schemas.microsoft.com/xaml/behaviors

提交回复
热议问题