我在几个项目中使用了System.Windows.Interactivity DLL而没有任何问题.现在在我的最新项目中,我无法让它发挥作用.我总是得到以下错误:
名称"交互"在名称空间" 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>
Run Code Online (Sandbox Code Playgroud)
名称空间:
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
Run Code Online (Sandbox Code Playgroud)
双方Microsoft.Expression.Interactions并System.Windows.Interactivity添加到项目的引用,我甚至复制该DLL的一个文件夹我的项目中.
知道这是怎么来的吗?我使用VS2012和.NET 4.5
在VS2010 xaml编辑器中支持Blend 3的Interactivity命名空间似乎存在问题.我安装了以下内容:
我正在尝试编译一个针对.Net 4 Client Profile的演示项目,并引用System.Windows.Interactivity(在Blend 3文件夹中).
在对象浏览器中,一切似乎都很好.我也可以从代码隐藏中访问Interaction.Behaviours,但如果我将命名空间xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"放在xaml文件中并尝试使用它,则intellisense为空.
如果我在那里复制一些东西,编译器说:
The tag 'Interaction.Behaviors' does not exist in XML namespace 'http://schemas.microsoft.com/expression/2010/interactivity'.
我是否需要安装Blend 4 RC或其他东西?