public class BoolToEditModeConverter : IValueConverter
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
if (!(value is bool isChecked))
throw new ArgumentException("Converter value must be of type 'bool'");
return isChecked
? EditMode.InplaceInactive
: EditMode.None;
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
throw new NotSupportedException();
}