Windows Phone应用缺少EventToCommand [英] EventToCommand Missing For Windows Phone App

查看:67
本文介绍了Windows Phone应用缺少EventToCommand的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用MVVM Light构建Windows Phone 8应用程序.到目前为止,一切都很好. 但是,当我使用EventToCommand时,出现多个错误.一个类似的问题在这里 EventToCommand在针对SL5迁移到v4时不起作用,可惜它不能解决我的问题.它会自动添加以下参考:

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"

我收到的错误:

名称空间"clr-namespace:GalaSoft.MvvmLight.Command; assembly = GalaSoft.MvvmLight.WP8"中不存在名称"EventToCommand"

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

找不到类型'command:EventToCommand'.确认您没有丢失程序集引用,并且所有引用的程序集均已构建.

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

标记'EventToCommand'在XML名称空间'clr-namespace:GalaSoft.MvvmLight.Command; assembly = GalaSoft.MvvmLight.WP8'中不存在

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.

谢谢

推荐答案

以下是正确的xmlns(程序集名称中缺少 Extras ):

Here is the correct xmlns (you were missing Extras in the assembly name):

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

这篇关于Windows Phone应用缺少EventToCommand的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆