I'm receiving this exception in the Utilities\CoerceValue() function when trying to save a change made in a DateTimePicker (WinForms) which is bound to a SmartDate field. The binding works both ways and the string value in this case is 02/08/2001. Here's my property definition:
public static PropertyInfo<SmartDate> OrderDateProperty = RegisterProperty<SmartDate>(p => p.OrderDate);
public string OrderDate
{
get { return GetProperty(OrderDateProperty); }
set { SetProperty(OrderDateProperty, value); }
}
Can anyone help?
When the backing field and property is different types, here SmartDate and string, you must use SetPropertyConvert/GetPropertyConvert.
Copyright (c) Marimer LLC