Пример #1
0
        private static bool FastStringToBrushConvert(Type outputType, string input, ref object output)
        {
            if (outputType == typeof(Brush))
            {
                output = SolidColorBrushHelper.Parse(input);
                return(true);
            }

            return(false);
        }
Пример #2
0
        private void SetColor(object sender, RoutedEventArgs e)
        {
            if (sender is Button btn && btn.Tag != null)
            {
#if !NETFX_CORE
                var colorBrush = SolidColorBrushHelper.Parse(btn.Tag as string);
                colorBrush.Opacity = 0.25;
                elevation1.Tag     = colorBrush.ColorWithOpacity;
#endif
            }
        }