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

wp8 入门到精通 ---转换的更多相关文章

  1. wp8 入门到精通 Utilities类 本地存储+异步

    public class CCSetting { public async static void AddOrUpdateValue<T>(string key, T value) { t ...

  2. wp8 入门到精通 虚拟标示符 设备ID

    //获得设备虚拟标示符 wp8 public string GetWindowsLiveAnonymousID() { object anid = new object(); string anony ...

  3. wp8 入门到精通 ---时间

    DateTime.Now.ToShortTimeString()DateTime dt = DateTime.Now;dt.ToString();//2005-11-5 13:21:25dt.ToFi ...

  4. wp8 入门到精通 仿美拍评论黑白列表思路

    static bool isbool = false; private void BindGameDelete() { Tile tile = new Tile(); List<Color> ...

  5. wp8 入门到精通 生命周期

  6. wp8 入门到精通 定时更新瓷贴

    public class ScheduledAgent : ScheduledTaskAgent { static ScheduledAgent() { Deployment.Current.Disp ...

  7. wp8 入门到精通 ImageCompress 图片压缩

    //实例化选择器 PhotoChooserTask photoChooserTask = new PhotoChooserTask(); BitmapImage bimg; int newPixelW ...

  8. wp8 入门到精通 Gallery

    <Grid x:Name="LayoutRoot" Background="Transparent"> <Grid.Resources> ...

  9. wp8 入门到精通 MultiMsgPrompt

    List<NotifyMsg> arraymsg = new List<NotifyMsg>(); List<NotifyInfo> ArrayNotifyInfo ...

随机推荐

  1. 【Networking】容器网络大观 && SDN 资料汇总

    SDNLAB技术分享(十五):容器网络大观   SDNLAB君• 16-06-17 •2957 人围观 编者按:本文系SDNLAB技术分享系列,本次分享来自SDN撕X群(群主:大猫猫)群直播,我们希望 ...

  2. 【leetcode】Wildcard Matching

    Wildcard Matching Implement wildcard pattern matching with support for '?' and '*'. '?' Matches any ...

  3. 转:C++编程隐蔽错误:error C2533: 构造函数不能有返回类型

    C++编程隐蔽错误:error C2533: 构造函数不能有返回类型 今天在编写类的时候,出现的错误. 提示一个类的构造函数不能够有返回类型.在cpp文件里,该构造函数定义处并没有返回类型.在头文件里 ...

  4. 终端ssh登录mac用shell打包ipa报错:replacing existing signature

    终端ssh登录mac用shell打包ipa报错:replacing existing signature 报错原因:login.keychain被锁定,ssh登录的没有访问权限 解决方法:终端敲入 s ...

  5. ionic 接触的第一个Hybrid项目

    最近需要维护一个Hybird项目,使用的是ionic,由于是第一个Hybrid项目,在这里记录下基本的知识. 先看一下ionic的最基本介绍: http://my.oschina.net/u/2275 ...

  6. irc操作小记

    IRC客户端 HexChat 跨平台支持,目前正在Windows上使用,暂无不满意的地方 polari 支持的命令太少了,功能有限. Empathy 重量级,支持各种消息协议 weechat/irss ...

  7. C#小知识特殊的DefaultValueAttribute

    今天看别人写的源码发现一个特殊的DefaultValueAttribute.使用如下. 原始代码: public class People { private string _Name = " ...

  8. ABAP 内表的行列转换-发货通知单-SLIS

    REPORT Z_TEST_COL_TO_ROW. TYPE-POOLS: slis. TABLES: VTTP,LIPS,LIKP,KNA1 ,VTTK. DATA: gd_fieldcat TYP ...

  9. Debian 配置apt-get源

    1.配置apt-get源 cp  /etc/apt/sources.list  /etc/apt/sources.listbak   #备份原有配置文件       nano  /etc/apt/so ...

  10. 通过JavaScript操作HTML中select标签

    添加: Js代码 1.function selectChange() 2.{ 3.var sel=document.getElementById("select1"); 4. Op ...