18 lines
472 B
C#
18 lines
472 B
C#
using System.Globalization;
|
|
using System.Windows.Data;
|
|
|
|
namespace EmbyToolbox.Converters;
|
|
|
|
public sealed class BooleanNegationConverter : IValueConverter
|
|
{
|
|
public object Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
|
|
{
|
|
return value is bool b ? !b : true;
|
|
}
|
|
|
|
public object ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
|
|
{
|
|
return value is bool b ? !b : false;
|
|
}
|
|
}
|