Is there any solution to binding a textbox to a nullable decimal? Whenever you leave the textbox empty the binding is not updated. I know one solution is to use a string property instead but I really don't want to do it that way.
Asked
Active
Viewed 2,202 times
2 Answers
16
You can do the trick by using TargetNullValue.
<TextBox Text="{Binding Value, TargetNullValue=''}"/>

alpha-mouse
- 4,953
- 24
- 36