private async Task <ImageSource> RefreshImage(string nameOfImageProperty, string imageLocation) { ImageSource imageSource; if (!String.IsNullOrEmpty(imageLocation)) { byte[] imageByteArray = await ImageHandler.ReadByteArrayFromSFTP(imageLocation); if (imageByteArray != null) { imageSource = ImageHandler.ByteToImage(imageByteArray); } else { imageSource = null; } } else { imageSource = null; } OnPropertyChanged(nameOfImageProperty); return(imageSource); }