C# Windows Phone应用程序缺少EventToCommand
我正在使用MVVM Light构建Windows Phone 8应用程序。到目前为止,一切顺利。 但是,当我使用EventToCommand时,我会出现多个错误。这里有一个类似的问题,但遗憾的是它并没有解决我的问题。!它会自动添加以下引用:C# Windows Phone应用程序缺少EventToCommand,c#,windows-phone-8,mvvm-light,C#,Windows Phone 8,Mvvm Light,我正在使用MVVM Light构建Windows Phone 8应用程序。到目前为止,一切顺利。 但是,当我使用EventToCommand时,我会出现多个错误。这里有一个类似的问题,但遗憾的是它并没有解决我的问题。!它会自动添加以下引用: xmlns:command1="http://www.galasoft.ch/mvvmlight" 我收到的错误: 名称“EventToCommand”在命名空间“clr命名空间:GalaSoft.MvvmLight.Command;assembly=Ga
xmlns:command1="http://www.galasoft.ch/mvvmlight"
我收到的错误:
名称“EventToCommand”在命名空间“clr命名空间:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.WP8”中不存在
找不到类型“command:EventToCommand”。验证是否缺少部件引用,以及是否已生成所有引用的部件
XML命名空间“clr命名空间:GalaSoft.MvvmLight.Command”中不存在标记“EventToCommand”;assembly=GalaSoft.MvvmLight.WP8'
如果我遗漏了什么或做错了什么,请告诉我
谢谢以下是正确的xmlns(您在程序集名称中缺少了额外的内容):
换成
xmlns:command1="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Extras.WP8"
在最新版本中,命令移动到平台部件:
xmlns:command="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Platform"
xmlns:command="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Platform"