How to detect if Xamarin.Forms Image control fails to load image from remote uri?

Vinayak Nikam 71 Reputation points
2021-03-23T11:48:23.513+00:00

I'm using Xamarin.Forms Image control to load image from some https url. In case if control fails to load the image like

  1. no network connectivity
  2. not authorized to access the image url
  3. SSL certificate issue

I want to display some custom error view where I will provide ability to try reloading the image.
Is there any event on the Image control where such errors can be captured?
If not, is there any way to customize Xamarin.Forms Image control that notifies such network issues?

Highly appreciate if anyone helps for any pointers.

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,371 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.