我正在使用 MVVM Light 构建 Windows Phone 8 应用程序。到目前为止,一切都很好。
但是,当我使用 EventToCommand 时,出现多个错误。一个类似的问题在这里迁移到 SL5 的 v4 时,EventToCommand 不起作用 https://stackoverflow.com/questions/11510233/eventtocommand-not-working-when-migrate-to-v4-for-sl5,但遗憾的是它并没有解决我的问题。!它会自动添加以下参考:
xmlns:command1="http://www.galasoft.ch/mvvmlight"
我收到的错误:
命名空间“clr-namespace:GalaSoft.MvvmLight.Command; assembly=GalaSoft.MvvmLight.WP8”中不存在名称“EventToCommand”
未找到类型“命令:EventToCommand”。验证您没有缺少程序集引用并且所有引用的程序集均已构建。
XML 命名空间“clr-namespace:GalaSoft.MvvmLight.Command; assembly=GalaSoft.MvvmLight.WP8”中不存在标记“EventToCommand”
如果我遗漏了什么或做错了什么,请告诉我。
Thanks
这是正确的 xmlns (你错过了Extras在程序集名称中):
xmlns:Command="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Extras.WP8"
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)