I have a scenario where I'm dynamically loading images, using ImageSource.FromFile, in my Xamarin Forms project based on strings that I get back from a service call. If I have a graphic with the same name as the string from the service call then the image is loaded. In the case where I don't have a corresponding graphic, the call succeeds but the image is not loaded because it doesn't exist. In this case, I'd like to know that it failed and load a default image, but I cannot seem to find any way to know if it failed - no exception or event. BTW, my images are local images (http://developer.xamarin.com/guides/cross-platform/xamarin-forms/working-with/images/#Local_Images). How might I accomplish this?
↧