我无法使MVVM Light EventToCommand
正常工作。我目前有以下软件包:
<packages>
<package id="CommonServiceLocator" version="1.3" targetFramework="net452" />
<package id="Expression.Blend.Sdk" version="1.0.2" targetFramework="net452" />
<package id="MvvmLightLibs" version="5.2.0.0" targetFramework="net452" />
</packages>
这是我在XAML中的代码:
<i:Interaction.Triggers>
<i:EventTrigger EventName="DragDelta">
<cmd:EventToCommand Command="{Binding DragMoveCommand}" PassEventArgsToCommand="True"/>
</i:EventTrigger>
</i:Interaction.Triggers>
每次运行它时,我都会收到一条错误消息:
无法加载文件或程序集'GalaSoft.MvvmLight.Platform,PublicKeyToken = 5f873c45e98af8a1'或其依赖项之一。该系统找不到指定的文件。
我目前正在运行.NET 4.5.2,并且不确定要执行此操作还需要做什么。所有的帮助都将不胜感激。
最佳答案
检查您项目中使用的System.Windows.Interactivity版本和GalaSoft库中使用的版本,如果未引用System.Windows.Interactivity
,则应引用。在项目中,如果没有帮助,请尝试清理解决方案,并删除项目目录中的所有obj
文件夹,然后重新引用GalaSof
t库。
关于wpf - 无法使MVVM Light EventToCommand正常工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35706145/