2
我用这个代码从互联网获取的图像的BitmapImage - 图像下载问题
var image = new BitmapImage();
image.BeginInit();
image.CacheOption = BitmapCacheOption.OnLoad;
image.CreateOptions = BitmapCreateOptions.IgnoreImageCache;
image.UriSource = new Uri(url, UriKind.Absolute);
image.EndInit();
RSSImage.Source = image;
有时没有图片... 看来,这是因为超时等..
无论如何,我使用一些异步。及时获取图像的方法?
任何线索?
谢谢!
只是不要忘了'WebClient'使用'using'语句中 –