MVVM EventToCommand not found

前端 未结 3 675
终归单人心
终归单人心 2021-01-24 21:12

Hi all I am trying to implement an on click effect in the items of a listbox but I keep getting this error:

The type \'cmd:EventToCommand\' was not found. Verify that yo

相关标签:
3条回答
  • 2021-01-24 21:24

    Add GalaSoft.MvvmLight library to references. Then

    use this xmlns:cmd="clr-namespace:GalaSoft.MvvmLight;assembly=GalaSoft.MvvmLight" instead of xmlns:cmd="http://www.galasoft.ch/mvvmlight"

    0 讨论(0)
  • 2021-01-24 21:29

    EventToCommand is part of MVVM-Light ... Here's an article on MSDN by the writter of MVVM light (Laurent Bugnion), where he talks about how to use it.

    You can also look at a similar answer here, but I guess your options are either using MVVM-Light if you want to use it, or sorting through he's code and implementing something similar yourself ...

    0 讨论(0)
  • 2021-01-24 21:39

    There is a good list of all behaviors and triggers that are available in Catel and how you can use them:

    https://catelproject.atlassian.net/wiki/pages/viewpage.action?pageId=1409064

    It also includes EventToCommand:

    https://catelproject.atlassian.net/wiki/display/CTL/EventToCommand

    0 讨论(0)
提交回复
热议问题