开发者

MVVMLight Toolkit, App.xaml, MergedDictionaries, global locator

Does anyone know how to use the ViewModelLocator in App.xaml, and also have MergedDictionary entries when using the MVVM Light Toolkit? I used the MVVM Light app template, and simply added a reference in App.xaml to my Styles.xaml, and am now getting the error below, but only when I include the entry for the view model locator. Here is what is in App.xaml:

开发者_如何转开发

The blue squiggly lines are all under each entry in ResourceDictionary, and hovering over displays the message:

"The designer does not support loading dictionaries that mix 'ResourceDictionary' items without a key and other items in the same collection. Please ensure that the 'Resources' property does not contain 'ResourcesDictionary' items without a key, or that the 'ResourceDictionary' item is the only element in the collection."

Thanks for any assistance anyone can provide.


I realise this is an old post, but I linked to here first when trying to find an answer. So for anyone looking for an answer I managed to get an answer here: http://geekswithblogs.net/lbugnion/archive/2010/10/26/adding-a-viewmodellocator-and-merged-dictionaries-to-app.xaml.aspx

Hope this helps.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜