13 lines
469 B
C#
13 lines
469 B
C#
using System;
|
|
using System.Globalization;
|
|
using System.Windows.Data;
|
|
|
|
namespace JD.Guinness.WPF.Module.Converter
|
|
{
|
|
public sealed class InverseBooleanConverter : IValueConverter
|
|
{
|
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) => value is bool b ? !b : value;
|
|
|
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) => value is bool b ? !b : value;
|
|
}
|
|
}
|