Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Properties does not exist: System.Windows.Interactivity?

Tags:

wpf

I have C#/WPF that has a persistent problem loading/resolving the System.Windows.Interactivity I am using Visual Studio 2010 as my editor and already installed Blend 4 + Blend 4 SDK,

......

xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity">

Why still return result Assembly was not found? Like my class library CustomBehaviorLibrary was missing?

like image 860
Hyde Avatar asked Jan 29 '13 03:01

Hyde


2 Answers

If it worked at runtime but not design-time then I am blaming VS 2010 for being buggy. I've had VS 2010 not recognize the local namespace when imported into XAML, but when opened in VS 2012 it worked in the designer with no problems. Unfortunately, Visual Studio 2010's XAML/WPF support is far from perfect. Expression Blend or Visual Studio 2012 are better.

I did like ViktorLaCroix 's suggestion. I would try

xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"

Instead of importing it using clr-namespace and see if that helps you. That's how I am using it and it works fine. I'll also show you my reference details for the library.

System.Windows.Interactivity
C:\Program Files (x86)\Microsoft SDKs\Expression\Blend\.NETFramework\v4.0\Libraries\System.Windows.Interactivity.dll
v4.0.30319
like image 104
Alan Avatar answered Dec 11 '22 00:12

Alan


The easiest way might be to get it from NuGet:

To install System.Windows.Interactivity v4.0 for WPF, run the following command in the Package Manager Console

PM> Install-Package System.Windows.Interactivity.WPF

http://www.nuget.org/packages/System.Windows.Interactivity.WPF/

like image 35
seabass2020 Avatar answered Dec 11 '22 01:12

seabass2020