示例#1
0
        internal static string GetOpacityPostfix(ThemeColorOpacity opacity)
        {
            var type      = typeof(ThemeColorOpacity);
            var fieldInfo = type.GetField(opacity.ToString());

            return(fieldInfo?.GetCustomAttribute <PostfixAttribute>()?.Value);
        }
示例#2
0
        private string GeneratePath(ThemeColor color, ThemeColorOpacity opacity)
        {
            var result = nameof(Theme.Brushes) + "." + color;

            if (opacity > ThemeColorOpacity.None)
            {
                result += Color.GetOpacityPostfix(opacity);
            }

            return(result);
        }