MVVM Light上缺少EventToCommand [英] EventToCommand missing on MVVM Light
问题描述
这个有用的类似乎已从最新的MVVM Light版本中删除,您知道为什么或如何解决吗?
我正在使用MvvmLightLibs.5.0.1.0,肯定在MvvmLightLibs.4.1.27.0上.因此,此问题与 Windows Phone App缺少的EventToCommand 无关. >
环境:VS2013,WP8.0
最终,我在Galasoft.MvvmLight.Platform上找到了EventToCommand
类.我猜组装的变化是一个多平台的框架是有意义的.
xmlns:Command="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Platform"
<i:Interaction.Triggers>
<i:EventTrigger EventName="Tap" >
<Command:EventToCommand Command="{Binding Path=MyVM.MyCommand, Source={StaticResource Locator}}"
PassEventArgsToCommand="False"
CommandParameter="{Binding}"/>
</i:EventTrigger>
</i:Interaction.Triggers>
This helpful class seems to be gone from the latest MVVM Light build, any idea why or how to work around it?
I'm using MvvmLightLibs.5.0.1.0, was definitely there on MvvmLightLibs.4.1.27.0. So this question is not related with one EventToCommand Missing For Windows Phone App
Environment: VS2013, WP8.0
Eventually, I found the EventToCommand
class on Galasoft.MvvmLight.Platform. I guess the assembly change makes sense being a multi-platform framework.
xmlns:Command="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Platform"
<i:Interaction.Triggers>
<i:EventTrigger EventName="Tap" >
<Command:EventToCommand Command="{Binding Path=MyVM.MyCommand, Source={StaticResource Locator}}"
PassEventArgsToCommand="False"
CommandParameter="{Binding}"/>
</i:EventTrigger>
</i:Interaction.Triggers>
这篇关于MVVM Light上缺少EventToCommand的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!