public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { FileListViewNode fileListViewNode = value as FileListViewNode; if (fileListViewNode.FileType == FileType.Directory) { return(fileListViewNode.ImagePath); } //todo:1处理图标性能问题 //todo:2处理图标预览效果问题 BitmapImage img = ThumbnailHelper.GetInstance().GetBitmapThumbnail(fileListViewNode.FullName).ToBitmapImage(); return(img); }