How to add System.Windows.Interactivity to project?
The easiest way might be to get it from NuGet:
http://www.nuget.org/packages/System.Windows.Interactivity.WPF/
Although this issue is quite old, i think this is relevant news / the most recent answer: Microsoft open-sourced XAML Behaviours and posted a blog post how to update to this version: https://devblogs.microsoft.com/dotnet/open-sourcing-xaml-behaviors-for-wpf/
To save you a click, this is the main steps to migrate:
- Remove reference to “Microsoft.Expression.Interactions” and “System.Windows.Interactivity”
- Install the Microsoft.Xaml.Behaviors.Wpf NuGet package.
- 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
- C# files – replace the usings in c# files “Microsoft.Xaml.Interactivity” and “Microsoft.Xaml.Interactions” with “Microsoft.Xaml.Behaviors”
There is a new NuGet package that contains the System.Windows.Interactivity.dll that is compatible with:
- WPF 4.0, 4.5
- Silverligt 4.0, 5.0
- Windows Phone 7.1, 8.0
- Windows Store 8, 8.1
To install Expression.Blend.Sdk, run the following command in the Package Manager Console
PM> Install-Package Expression.Blend.Sdk
http://www.nuget.org/packages/Expression.Blend.Sdk/
The official package for behaviors is Microsoft.Xaml.Behaviors.Wpf
.
It used to be in the Blend SDK (deprecated).
See Jan's answer for more details if you need to migrate.