• wp8 入门到精通 ---转换


             /// <summary>
            /// 颜色字符串转Color
            /// </summary>
            public static Color ConvertFromString(string argb)
            {
                uint result;
                if (uint.TryParse(argb.TrimStart('#', '0'), NumberStyles.HexNumber, null, out result))
                {
                    uint a = argb.Length > 8 ? result >> 24 : 0xFF;
                    uint r = result >> 16;
                    uint g = (result << 8) >> 16;
                    uint b = (result << 16) >> 16;

                    return Color.FromArgb((byte)a, (byte)r, (byte)g, (byte)b);
                }
                return Colors.Black;
            } 
  • 相关阅读:
    1_Selenium环境搭建
    python functools
    python 参数注解inspect
    python 堆排序
    python functools
    python 装饰器
    python 柯里化
    python 高阶函数
    python 树
    python 函数销毁
  • 原文地址:https://www.cnblogs.com/androllen/p/3855287.html
Copyright © 2020-2023  润新知