1

Closed

Nullable Items don't behave correctly

description

If the bound property is of type nullable<T> i.e. int? the textbox should be able to be set to empty.
However this results in an error on screen.
Closed Jul 21, 2010 at 8:31 AM by AdamMills

comments

AdamMills wrote Jul 21, 2010 at 8:30 AM

Make sure you use TargetNullValue={x:Static System:String.Empty} in your binding to tell WPF that empty string (value used by empty textbox) should be null

Thanks to
http://discoveringdotnet.alexeyev.org/2009/03/binding-to-nullable-values-wpf.html

wrote Jul 21, 2010 at 8:31 AM

wrote Feb 1, 2013 at 2:27 AM

wrote May 8, 2013 at 5:11 PM