private string GetKeyValueFromResources(string keyName)
{
var reskeys = Application.Current.Resources.Keys;
if (string.IsNullOrEmpty(keyName) || reskeys == null || reskeys.Count == 0)
return "";
for (var i = 0; i < reskeys.Count; ++i)
{
if (reskeys.ElementAt(i).ToString() != keyName) continue;
return Application.Current.Resources.Values.ElementAt(i).ToString();
}
return "";
}