I have a view model with a Nullable<MyEnum> property. The EnumToBooleanConverter (from the Scheduler's assembly) appears to Convert just fine, but upon ConvertBack, a System.ArgumentException is thrown:
- Type provided must be an Enum.
- Parameter name: enumType
- at System.Enum.TryParseEnum(...)
- at System.Enum.Parse(...)
- at Telerik.Windows.Controls.EnumToBooleanConverter.ParseObjectToEnum(...)
- at Telerik.Windows.Controls.EnumToBooleanConverter.ConvertBack(...)
- ...
As best I can tell "targetType" is the "enumType" parameter System.Enum.TryParseEnum is complaining about. In my case, I believe the target type for my property is Nullable<MyEnum>, which is *not* a straight Enum.
In fact, I created my own IValueConverter that guards this and unwraps the nullable type, and then delegates to the Telerik converter
This avoids the runtime error.