using System.Globalization; using System.Windows.Data; using Livia.Models.Data; namespace Livia.Views.Converters; [ValueConversion(typeof(IEnumerable), typeof(string))] public class SeriesListToStringConverter : IValueConverter { public object Convert(object? value, Type targetType, object? parameter, CultureInfo culture) { return value is not IEnumerable list ? string.Empty : string.Join("\n", list.Select(i => i.SeriesDescription)); } public object ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture) { throw new NotSupportedException(); } }