Files
harmonia/Harmonia.WinUI/Converters/ArtistsToStringConverter.cs

25 lines
584 B
C#

using Microsoft.UI.Xaml.Data;
using System;
namespace Harmonia.WinUI.Converters;
public partial class ArtistsToStringConverter : IValueConverter
{
public ArtistsToStringConverter()
{
}
public object Convert(object value, Type targetType, object parameter, string language)
{
if (value is not string[] artists)
return string.Empty;
return string.Join(" / ", artists);
}
public object ConvertBack(object value, Type targetType, object parameter, string language)
{
throw new NotImplementedException();
}
}