gpt4 book ai didi

c# - 使用 Xamarin ImageSource.FromUri ("https://my image url")如何判断是否已检索到图像

转载 作者:行者123 更新时间:2023-11-30 18:11:30 25 4
gpt4 key购买 nike

我正在使用 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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com