/// <inheritdoc />
        public object Convert(object value, Type targetType, object format, CultureInfo culture)
        {
            if (value is string thumbnailFilename && !App.IsInDesignMode)
            {
                return(ThumbnailGenerator.GetThumbnail(
                           App.ViewModel.Playlist.ThumbsDirectory, thumbnailFilename));
            }

            return(default(ImageSource));
        }
Ejemplo n.º 2
0
        public object Convert(object value, Type targetType, object format, CultureInfo culture)
        {
            var thumbnailFilename = value as string;

            if (thumbnailFilename == null)
            {
                return(default(ImageSource));
            }
            if (Platform.GuiContext.Current.IsInDesignTime)
            {
                return(default(ImageSource));
            }

            return(ThumbnailGenerator.GetThumbnail(App.Current.ViewModel.Playlist.ThumbsDirectory, thumbnailFilename));
        }