using System.Globalization; using System.Windows.Data; namespace ytLive.Helpers; /// True when the bound value's ToString() equals the ConverterParameter string. public class EnumToBoolConverter : IValueConverter { public object Convert(object? value, Type targetType, object? parameter, CultureInfo culture) => value?.ToString() == parameter?.ToString(); public object ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture) => Binding.DoNothing; }