EventToCommand not working when migrate to v4 for SL5

纵然是瞬间 提交于 2019-12-11 19:20:05

问题


I have SL4 app with MVVMLight. I migrate it to SL 5 and got following error when compiling the app:

The tag 'EventToCommand' does not exist in XML namespace 'clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.SL5

The xaml for this error is:

  xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
  xmlns:cmd="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.SL5"

<i:Interaction.Triggers>
   <i:EventTrigger EventName="MouseLeftButtonUp">
       <cmd:EventToCommand Command="{Binding ResetPasswordCommand,Mode=OneWay}"                                             
        MustToggleIsEnabledValue="True" />
    </i:EventTrigger>
</i:Interaction.Triggers>

quite confused. Have update all assemblies for new platform. How to resolve this problem?


回答1:


Figure it out: should use assembly=GalaSoft.MvvmLight.Extras.SL5 instead of assembly=GalaSoft.MvvmLight.SL5. Thanks.



来源:https://stackoverflow.com/questions/11510233/eventtocommand-not-working-when-migrate-to-v4-for-sl5

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