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