属性不存在:System.Windows.Interactivity? [英] Properties does not exist: System.Windows.Interactivity?

查看:48
本文介绍了属性不存在:System.Windows.Interactivity?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的 C#/WPF 在加载/解决 System.Windows.Interactivity 时存在持久性问题我使用 Visual Studio 2010 作为我的编辑器,并且已经安装了 Blend 4 + Blend 4 SDK,

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">

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

为什么还是返回结果Assembly not found?好像我的类库 CustomBehaviorLibrary 丢失了?

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

推荐答案

如果它在运行时有效,但在设计时无效,那么我将责怪 VS 2010 存在缺陷.我让 VS 2010 在导入 XAML 时无法识别本地命名空间,但是在 VS 2012 中打开时,它在设计器中正常工作,没有任何问题.不幸的是,Visual Studio 2010 的 XAML/WPF 支持远非完美.Expression Blend 或 Visual Studio 2012 更好.

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.

我确实喜欢 ViktorLaCroix 的建议.我会尝试

I did like ViktorLaCroix 's suggestion. I would try

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

而不是使用 clr-namespace 导入它,看看是否对您有帮助.这就是我使用它的方式,它工作正常.我还会向您展示我的图书馆参考资料.

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

这篇关于属性不存在:System.Windows.Interactivity?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆