using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows.Data; using System.Globalization; namespace HeuristicLab.MainForm.WPF { public class AndNotConverter : IMultiValueConverter { public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) { if (values.Length == 2 && values[0] is bool && values[1] is bool && targetType == typeof(bool)) return (bool)values[0] && !(bool)values[1]; return null; } public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) { throw new NotImplementedException(); } } public class NotConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { return !(bool)value; } public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { return !(bool)value; } } }