private void OnThumbnailLoaded(LoadThumbnailResult result)
 {
     //just toss it if it's not the size we are currently looking for, or we're disposed.
     if (result.Error == null && (result.Size != _thumbnailSize || _isDisposed))
     {
         if (result.ThumbnailData != null)
             result.ThumbnailData.Dispose();
     }
     else
     {
         ImageData = result.ThumbnailData ?? Loader.GetErrorThumbnail(_thumbnailSize);
         _isImageValid = _isImageLoaded = true;
     }
 }
 private void OnThumbnailLoadedAsync(LoadThumbnailResult result)
 {
     try
     {
         //Dispose the image on the thread on which the image was rendered because of some weirdities with current rendering implementation.
         result.Descriptor.ReferenceImage.Dispose();
         SynchronizationContext.Post(ignore => OnThumbnailLoaded(result), null);
     }
     catch (Exception e)
     {
         Platform.Log(LogLevel.Error, e);
     }
 }