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:
The name "Interaction" does not exist in the namespace "http://schemas.microsoft.com/expression/2010/interactivity".
<i:Interaction.Triggers> <EventTrigger EventName="SelectionChanged"> <i:InvokeCommandAction Command="{Binding AddSelectLocomotifCommand}" CommandParameter="{Binding SelectedItem, ElementName=listBoxLocs}" /> </EventTrigger> </i:Interaction.Triggers>
And the namespace:
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
Both Microsoft.Expression.Interactions
and System.Windows.Interactivity
are added to the projects references and I even copied the DLL's to a folder within my project.
Any idea how this comes? I use VS2012 with .NET 4.5
Remove any project reference to Microsoft.Expression.Interactions
and System.Windows.Interactivity
.
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
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
If you have this problem before everything else double check if you have reference to both Microsoft.Expression.Interactions
AND System.Windows.Interactivity
.
I just want to warn, that I tried to do everything like PitAttack76 wrote on his answer and it didn't uninstall Blend for me. It just uninstall some parts so when I restart my computer and want to open the project in Blend it writes an error message as in this thread. Than I have to install .NET framework 4.5.1
and Microsoft Build Tools 2013
to Blend start working again. Nevertheless it didn't help me in any way - my problem was, that I have only Microsoft.Expression.Interactions
in my references.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With