Share the post "How To Fix ResourceDictionary Is Inside A ResourceDictionary And Does Not Have A Key"
The solution is very easy actually but usually hounds new Windows Phone developers when they start with XAML. Just make sure your ResourceDictionary tag is first in your Application.Resources tag.
I encountered this problem because I declared the internationalization resource file first and then resource dictionary second (see code below).
|
1 2 3 4 5 6 7 8 |
<Application.Resources> <local:LocalizedStrings xmlns:local="clr-namespace:HelloWorld.Resources" x:Key="LocalizedStrings" /> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="Resources.xaml"/> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> </Application.Resources> |
By transferring the ResourceDictionary tag to the top, that fixed the problem.