What I have doen has been based on this article: http://msdn.microsoft.com/en-us/library/aa348547.aspx
I am trying to get a string from a merged dictionary that is loaded in app.xaml. I am trying to do this from a class that is not a code behind file. I know that the resource file can load in principle because page elements are being styled from the xaml markup from styles contained in the Styles.xaml file.
The app.xaml file
<Application
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="theApp.App">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Assets/Styles.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>
the styles.xaml file (edited down for simplicity)
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
xmlns:clr="clr-namespace:System;assembly=mscorlib">
<clr:String x:Key="applicationName">TheKraken</clr:String>
</ResourceDictionary>
The line of code i am using to try and access the resource
string appName = (string)App.Current.Resources["applicationName"];
Any idea what i am missing?