【发布时间】:2017-11-22 05:02:29
【问题描述】:
我有一个带有 ListView 和 ImageCells 的 Xamarin.Forms 应用程序。其中的图像在 Android 和 iOS 中可见,但在 UWP 中不可见。
相关代码:
imageCell.SetBinding(ImageCell.ImageSourceProperty, theImagePropertyName);
和属性:
return ImageSource.FromUri(uri);
uri 是正确的 uri(如断点所示),它是外部 uri https://blahblahblah.com,如前所述 - 它适用于 Android 和 iOS。我试过一个外部静态 uri,一个内部 (ms-appx:///Assets/a.png) uri...
可能是什么问题?
【问题讨论】:
-
您是否将图像放在应用程序的根文件夹中?
-
@JesusAngulo 对不起,我不清楚 - uri 是外部的 (
https://blahblahblah.com)。我现在编辑了这个问题以明确这一点。 -
您是否在清单中设置了 Internet (InternetClient) 权限?
-
@JesusAngulo 我尝试使用静态图像。没有帮助。 (顺便说一句 - 您的链接是 404。)
-
@JesusAngulo 作为旁注:
https://www.xamarin.com/content/images/pages/forms/example-app.png。工作中。不知何故,您似乎需要添加www否则会导致 404。
标签: c# xamarin uwp xamarin.forms xamarin.uwp