EventToCommand missing on MVVM Light

前端 未结 1 584
暗喜
暗喜 2021-01-21 05:03

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 Mv

相关标签:
1条回答
  • 2021-01-21 05:37

    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>
    
    0 讨论(0)
提交回复
热议问题