📜  如何在 wpf 中查看来自网站的图像 - 无论代码示例

📅  最后修改于: 2022-03-11 14:59:33.200000             🧑  作者: Mango

代码示例1
var image = new Image();
var fullFilePath = @"http://www.americanlayout.com/wp/wp-content/uploads/2012/08/C-To-Go-300x300.png";

BitmapImage bitmap = new BitmapImage();
bitmap.BeginInit();
bitmap.UriSource = new Uri(fullFilePath, UriKind.Absolute);
bitmap.EndInit();

image.Source = bitmap;
wrapPanel1.Children.Add(image);