summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Xaml/MarkupExtensions/StaticResourceExtension.cs
diff options
context:
space:
mode:
authorStephane Delcroix <stephane@delcroix.org>2017-04-11 18:09:06 (GMT)
committerJason Smith <jason.smith@xamarin.com>2017-04-11 18:09:06 (GMT)
commitd3cc1b5651918c9d306ec0002515371cae85262a (patch)
tree9c77998e3a5849e27c36da703e79ccdfe615ec5c /Xamarin.Forms.Xaml/MarkupExtensions/StaticResourceExtension.cs
parent093a4efa2da9cb681890158ca8ee9bb6f30b0a8c (diff)
downloadxamarin-forms-d3cc1b5651918c9d306ec0002515371cae85262a.zip
xamarin-forms-d3cc1b5651918c9d306ec0002515371cae85262a.tar.gz
xamarin-forms-d3cc1b5651918c9d306ec0002515371cae85262a.tar.bz2
[C] Lookup in RD also lookup in merged RDs (#861)
Diffstat (limited to 'Xamarin.Forms.Xaml/MarkupExtensions/StaticResourceExtension.cs')
-rw-r--r--Xamarin.Forms.Xaml/MarkupExtensions/StaticResourceExtension.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Xamarin.Forms.Xaml/MarkupExtensions/StaticResourceExtension.cs b/Xamarin.Forms.Xaml/MarkupExtensions/StaticResourceExtension.cs
index 16c8053..14e0b8b 100644
--- a/Xamarin.Forms.Xaml/MarkupExtensions/StaticResourceExtension.cs
+++ b/Xamarin.Forms.Xaml/MarkupExtensions/StaticResourceExtension.cs
@@ -31,7 +31,7 @@ namespace Xamarin.Forms.Xaml
var resDict = ve?.Resources ?? p as ResourceDictionary;
if (resDict == null)
continue;
- if (resDict.TryGetMergedValue(Key, out resource))
+ if (resDict.TryGetValue(Key, out resource))
break;
}
resource = resource ?? GetApplicationLevelResource(Key, xmlLineInfo);
@@ -59,7 +59,7 @@ namespace Xamarin.Forms.Xaml
internal object GetApplicationLevelResource(string key, IXmlLineInfo xmlLineInfo)
{
object resource;
- if (Application.Current == null || Application.Current.Resources == null || !Application.Current.Resources.TryGetMergedValue(Key, out resource))
+ if (Application.Current == null || Application.Current.Resources == null || !Application.Current.Resources.TryGetValue(Key, out resource))
throw new XamlParseException($"StaticResource not found for key {Key}", xmlLineInfo);
return resource;
}