public object Convert (object value, Type targetType, object parameter, CultureInfo culture) { if (targetType != typeof (bool)) throw new ArgumentException(); if (value is bool) return !(bool) value; return Binding.DoNothing; }