Esempio n. 1
0
        public SolidColorBrush GetBrush(string name)
        {
            if (!_nameToArgb.TryGetValue(name, out var argb))
            {
                return(DefaultDrawingPrimitives.DefaultBrush);
            }

            return(BrushCache.GetBrush(ColorConverter.FromArgb(argb)));
        }
Esempio n. 2
0
        public SolidColorBrush GetBrush(string name)
        {
            if (!_nameToArgb.TryGetValue(name, out var argb))
            {
                return(Brushes.Black);
            }

            return(BrushCache.GetBrush(ColorConverter.FromArgb(argb)));
        }