我想将[URL : https://www.example.com/folders/file.jpg][1]中的am图像保存在BitmapImage的对象中
我尝试了下面的:
BitmapImage b = new BitmapImage();
b.SetSource(new Uri("https:www.example.com/folders/file.jpg", UriKind.RelativeOrAbsolute));但这不管用。为什么?
发布于 2014-11-07 08:37:57
这个代码测试并为我工作: Image MyImage = new ();
// Create source.
BitmapImage bImage = new BitmapImage();
bImage.UriSource = new Uri(@"https:www.example.com/folders/file.jpg", UriKind.RelativeOrAbsolute);
// Set the image source.
MyImage.Source = bImage;告诉我是否为你工作或需要更多的信息。祝你好运,伙计!
https://stackoverflow.com/questions/26796405
复制相似问题