为什么该代码在WinRT中工作但在Windows Phone 8.1中不起作用?
foreach (var img_url in imagesList)
{
image = new Image();
image.Source = new BitmapImage(new Uri(img_url, UriKind.Absolute));
image.Width = 300;
image.Height = 300;
pnlImages.Children.Add(image);
}
答案 0 :(得分:0)
试试这个:
foreach (var img_url in imagesList)
{
image = new Image();
image.Source = new Windows.UI.Xaml.Media.Imaging.BitmapImage(new Uri(img_url));
image.Width = 300;
image.Height = 300;
pnlImages.Children.Add(image);
}
希望它有所帮助!