class FooToBoolConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { return value == parameter; } public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { return (bool) value ? parameter : Foo.None; } }