Ejemplo 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);
        }
Ejemplo 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);
        }
Ejemplo 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);
        }