摘要: 使用background thread解码图片 在Windows Phone中支持的图片格式有jpg和png,微软建议使用jpg格式的图片,因为jpg格式的图片在解码速度上要比png快。那么我们怎么来控制用后台线程来解码图片呢?看下面的代码。 var bi = new BitmapImage();bi.CreateOptions = BitmapCreateOptions.BackgroundCreation; 这两段代码都设置了BitmapImage的CreateOptions属性,这样做避免了在UI线程来对图片解码,在使用过程中BackgroundCreation确实有效地提... 阅读全文
posted @ 2014-04-07 17:25 艾克赛尔 阅读(938) 评论(4) 推荐(1) 编辑