EventToCommand missing on MVVM Light

限于喜欢 提交于 2019-12-02 03:28:56

问题


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


回答1:


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>


来源:https://stackoverflow.com/questions/26421397/eventtocommand-missing-on-mvvm-light

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!