Esempio n. 1
0
        public Brush GetResource(string resource)
        {
            var provider   = new DictionaryResourceProvider();
            var dictionary = provider.GetResource(Enums.ResourceDictionaryType.ColourResourceDictionary.ToString());
            var colourName = resource.Substring(resource.IndexOf('_') + 1);
            var brush      = dictionary[colourName];

            return(brush as Brush);
        }
Esempio n. 2
0
        public string GetResource(string resourceName)
        {
            var provider   = new DictionaryResourceProvider();
            var dictionary = provider.GetResource(nameof(Enums.ResourceDictionaryType.ImageIconResourceDictionary));

            var imageIcon = dictionary[resourceName];

            return(imageIcon as string);
        }
Esempio n. 3
0
        public Geometry GetResource(string resourceName)
        {
            var provider   = new DictionaryResourceProvider();
            var dictionary = provider.GetResource(Enums.ResourceDictionaryType.VectorIconResourceDictionary.ToString());

            var geometry = dictionary[resourceName];

            return(geometry as Geometry);
        }