I have a WPF app that uses Entity Framework for accessing DB.
When the user types the value in a Price textbox bound to a decimal field and inserts a comma, WPF automatically removes it. The fact is that in Italy comma is the decimal separator, so i would like to leave the comma and replacing it with the “.” dot character. How can i do it?
I have a WPF app that uses Entity Framework for accessing DB. When the
Share
There are two ways to approach this, as blam suggests you can process it as a key down event and do conversion on the fly, OR you can do input validation using a string binding instead of a decimal binding and build a conversion layer to provide an interpretation of string to decimal.