foreach (var p in valueProvider.ParentObjects) {
var irp = p as IResourcesProvider;
- var resDict = irp != null && irp.IsResourcesCreated ? irp.Resources : p as ResourceDictionary;
+ var resDict = irp != null && irp.IsResourcesCreated ? irp.XamlResources : p as ResourceDictionary;
if (resDict == null)
continue;
if (resDict.TryGetValue(Key, out resource))
internal object GetApplicationLevelResource(string key, IXmlLineInfo xmlLineInfo)
{
object resource = null;
- if (Application.Current == null || !((IResourcesProvider)Application.Current).IsResourcesCreated || !Application.Current.Resources.TryGetValue(Key, out resource))
+ if (Application.Current == null || !((IResourcesProvider)Application.Current).IsResourcesCreated || !Application.Current.XamlResources.TryGetValue(Key, out resource))
throw new XamlParseException($"StaticResource not found for key {Key}", xmlLineInfo);
return resource;
}