protected override void OnElementChanged(ElementChangedEventArgs<Image> e)
        {
            base.OnElementChanged(e);

            var targetImageView = this.Control;

            Bitmap image = null;
            var networkStatus = Reachability.InternetConnectionStatus();
            var isReachable = networkStatus != NetworkStatus.NotReachable;

            if (isReachable)
            {
                image = GetImageFromWeb(WebImage.ImageUrl);
            }
            else
            {
                if (!string.IsNullOrEmpty(WebImage.DefaultImage))
                {
                    var handler = new FileImageSourceHandler();
                    image = handler.LoadImageAsync(ImageSource.FromFile(WebImage.DefaultImage), this.Context).Result;
                }
            }

            targetImageView.SetImageBitmap(image);
        }
 /// <summary>
 /// Returns the proper <see cref="IImageSourceHandler"/> based on the type of <see cref="ImageSource"/> provided.
 /// </summary>
 /// <param name="source">The <see cref="ImageSource"/> to get the handler for.</param>
 /// <returns>The needed handler.</returns>
 private static IImageSourceHandler GetHandler(ImageSource source)
 {
     IImageSourceHandler returnValue = null;
     if (source is UriImageSource) {
         returnValue = new ImageLoaderSourceHandler ();
     } else if (source is FileImageSource) {
         returnValue = new FileImageSourceHandler ();
     } else if (source is StreamImageSource) {
         returnValue = new StreamImagesourceHandler ();
     }
     return returnValue;
 }
		public static IImageSourceHandler GetHandler (this ImageSource source)
		{
			//Image source handler to return
			IImageSourceHandler returnValue = null;
			//check the specific source type and return the correct image source handler
			if (source is UriImageSource)
			{
				returnValue = new ImageLoaderSourceHandler();
			}
			else if (source is FileImageSource)
			{
				returnValue = new FileImageSourceHandler();
			}
			else if (source is StreamImageSource)
			{
				returnValue = new StreamImagesourceHandler();
			}
			return returnValue;
		}