public object Convert(object value, Type targetType, object parameter, string language) { if (value is StorageFile file) { var bytes = file.GetThumbnailBytes().Result; return(BitmapConversion.FromBytes(bytes)); } return(null); }
public object Convert(object value, Type targetType, object parameter, string language) { return(value is byte[] bytes?BitmapConversion.FromBytes(bytes) : null); }