Errors in App.xaml trying to use MVVM Light in Windows Phone 8 project

橙三吉。 提交于 2019-12-05 07:26:39

I had this problem before. To make it work in WP8 replace this:

<ResourceDictionary>
    <vm:ViewModelLocator x:Key="Locator" d:IsDataSource="True" />
    <ResourceDictionary.MergedDictionaries></ResourceDictionary.MergedDictionaries>
</ResourceDictionary>

With just this:

<vm:ViewModelLocator x:Key="Locator" d:IsDataSource="True" />

But I haven't bothered as to why it works on WP7 but not WP8

Balasubramani M

Insert everything into ResourceDictionary rather than in ApplicationResources with all necessary namespaces, as mentioned already in this stackoverflow question.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!