简体   繁体   中英

EventToCommand Missing For Windows Phone App

I'm building Windows Phone 8 app using MVVM Light. So far, so good. However, when I used EventToCommand, I get multiple errors. One similar question is here EventToCommand not working when migrate to v4 for SL5 , but sadly it doesn't solve my problem.! It automatically adds following reference:

xmlns:command1="http://www.galasoft.ch/mvvmlight"

Errors that I receive:

The name "EventToCommand" does not exist in the namespace "clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.WP8"

The type 'command:EventToCommand' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built.

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

Let me know if I'm missing anything or doing something wrong.

Thanks

这是正确的xmlns(您在程序集名称中缺少Extras ):

xmlns:Command="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Extras.WP8"

替换为

xmlns:command1="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Extras.WP8"

使用最新版本,命令移至平台程序集:

xmlns:command="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Platform"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM