示例#1
0
        public static object FindResource(string resource, ResourceDictionary resources, object defaultValue)
        {
            var boxedResource = resource;

            return(resources.HasKey(boxedResource) ? resources.Lookup(boxedResource) : defaultValue);
        }
示例#2
0
        object FindResourceOrNull(string resource, ResourceDictionary resources)
        {
            object boxedResource = resource;

            return(resources.HasKey(boxedResource) ? resources.Lookup(boxedResource) : null);
        }