xamlwindows-phone-8mvvmmvvm-lighteventtocommand

EventToCommand missing on MVVM Light


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


Solution

  • 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>