我正在使用 ImageSource.FromUri(new Uri("https://my image uri")
并且效果很好。
但是如何判断我是否已成功检索图像?
当我提供一个不存在的 URI 时,我没有收到任何错误并且 FromUri() 返回一个 UriImageSource 但没有图像也没有异常。
最佳答案
看看答案here 我在 Android 上试过,它运行良好。
Quote
1 - Have a look at FFImageLoading Plugin, It provides all you need and more
2- Specifically the
ErrorPlaceholder
property is what you are looking for. Here you can provide an image which is shown when an error occurs!
关于c# - 使用 Xamarin ImageSource.FromUri ("https://my image url")如何判断是否已检索到图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58033812/