http://bbs.csdn.net/topics/390120529
最后通过这种方式实现
string url = carInfo.NetworkPath + carInfo.FileSource.First;
// url:http://localhost/ITSImages/20120625/01/192168010176/卡口抓拍/皖J21742.jpg
Uri uri = new Uri(url);
WebClient w = new WebClient();
w.OpenReadCompleted += (sender, e) =>
{
if (e.Error == null)
{
BitmapImage bitImg = new BitmapImage();
bitImg.SetSource(e.Result); this.SSCX.pic.Source = bitImg;
}
// else
// this.SSCX.pic.Source ="本地图片";
};
w.OpenReadAsync(uri);
时间: 2024-10-06 05:25:15