コード例 #1
0
        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);
        }
コード例 #2
0
 public object Convert(object value, Type targetType, object parameter, string language)
 {
     return(value is byte[] bytes?BitmapConversion.FromBytes(bytes) : null);
 }