Mike
Mike

Reputation: 311

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.

Upvotes: 1

Views: 899

Answers (1)

Ads
Ads

Reputation: 31

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.

Upvotes: 3

Related Questions