wpf_player.BooleanInverter.Convert C# (CSharp) Method

Convert() public method

Converts the boolean using the not operator
public Convert ( object value, Type targetType, object parameter, System culture ) : object
value object Boolean to invert
targetType System.Type
parameter object
culture System
return object
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            if ((value is bool) && (targetType == typeof(bool)))
            {
                bool v = (bool)value;
                return !v;
            }
            else
            {
                return false;
            }
        }