从vs2013升级到vs2015时发生EventToCommand问题

时间:2015-10-10 19:28:34

标签: c# wpf mvvm mvvm-light

我最近从vs2013升级到vs2015。我的项目是基于WPF的,使用mvvm light库。但是,我使用mvvm light EventToCommand获得了以下设计时错误:

无法将类型为eventtrigger的实例添加到triggercollection类型的集合中。仅允许类型为T的项目

只有在通过vs2015运行我的应用程序时才会发生这种情况。 (我已将我的sln和项目文件从12更新到14)。

非常感谢任何帮助。

xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:command="http://www.galasoft.ch/mvvmlight"

<i:Interaction.Triggers>
        <i:EventTrigger EventName="Loaded">
            <command:EventToCommand Command="{Binding OnLoadingCommand}"/>
        </i:EventTrigger>
        <i:EventTrigger EventName="Unloaded">
            <command:EventToCommand Command="{Binding OnClosingCommand}"/>
        </i:EventTrigger>
    </i:Interaction.Triggers>

0 个答案:

没有答案
相关问题