using System.Globalization;
using System.Windows.Data;
namespace GsConfigTool.Helpers;
[ValueConversion(typeof(bool), typeof(double))]
public class BoolToOpacityConverter : IValueConverter
{
public static readonly BoolToOpacityConverter Instance = new();
public object Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
=> value is true ? 1.0 : 0.4;
public object ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
=> throw new NotImplementedException();
}