名称“交互"在命名空间“http://schemas.microsoft.com/expression/2010/interactivity"中不存在; [英] The name "Interaction" does not exist in the namespace "http://schemas.microsoft.com/expression/2010/interactivity"

查看:50
本文介绍了名称“交互"在命名空间“http://schemas.microsoft.com/expression/2010/interactivity"中不存在;的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在几个项目中使用了 System.Windows.Interactivity DLL,没有任何问题.现在在我的最新项目中,我无法让它工作.我总是收到以下错误:

名称Interaction"在名称空间http://schemas.microsoft 中不存在.com/expression/2010/interactivity".

<EventTrigger EventName="SelectionChanged"><i:InvokeCommandAction Command="{Binding AddSelectLocomotifCommand}"CommandParameter="{Binding SelectedItem, ElementName=listBoxLocs}"/></事件触发器></i:Interaction.Triggers>

和命名空间:

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

Microsoft.Expression.InteractionsSystem.Windows.Interactivity 都添加到项目引用中,我什至将 DLL 复制到了项目中的文件夹中.>

知道这是怎么回事吗?我使用 VS2012 和 .NET 4.5

解决方案

好的,我已经解决了.当我安装 Visual Studio 2012 Professional(带 Blend)时,我可以选择为 Visual Studio 安装 Blend.我想可能是这导致了问题,所以我再次打开安装程序,选择修改并取消选中 Blend for Visual Studio 选项.

猜猜看,它奏效了.没有更多的交互错误.这现在又可以正常工作了!实际问题是什么,我不知道,如果有人知道,请告诉我:)

<i:EventTrigger EventName="MouseDoubleClick"><i:InvokeCommandAction Command="{Binding AddSelectLocomotifCommand}"CommandParameter="{Binding SelectedItem, ElementName=listBoxLocs}"/></i:EventTrigger></i:Interaction.Triggers>

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

解决方案

Ok, I've got it fixed. When I installed Visual Studio 2012 Professional (with Blend), I had the option to install Blend for Visual Studio. I thought that maybe that caused the problem so I opened the installer again, choosed Modify and unchecked the option Blend for Visual Studio.

And guess what, it worked. No more errors on the Interaction. This now works fine again! What the actual issue is, I don't know so if anyone does know, do please tell me :)

<i:Interaction.Triggers>
    <i:EventTrigger EventName="MouseDoubleClick">
        <i:InvokeCommandAction Command="{Binding AddSelectLocomotifCommand}"
                                                     CommandParameter="{Binding SelectedItem, ElementName=listBoxLocs}" />
    </i:EventTrigger>
</i:Interaction.Triggers>

这篇关于名称“交互"在命名空间“http://schemas.microsoft.com/expression/2010/interactivity"中不存在;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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