I will start by saying that I am completely new to WPF. I am trying to learn and diagnose an existing application and I had a question I was hoping someone could answer.
I noticed when a user enters a percentage, it requires the user to enter a decimal value (which makes sense), but then it displays it as a percentage like if the user enters .50 it is displayed in the cell as "50%" (after leaving the cell of course). The reason it behaves this way is obvious to me, because the format is set to "{0:P}".
I wanted to allow the users to enter "50 %" so I created a converter (that for instance converts "50 %" to .5 and it works great).
What puzzles me is why isn't a converter needed for the currency fields (Format = "{0:C}")? I am surprised that the DataGrid allows the user to enter dollar signs, commas, etc and then coverts them to a decimal (money type in SQL).
Is there some automagic stuff going on with the Currency Format (or some other property that I just haven't found in the code yet) or is there a Converter somewhere that I haven't discovered?
How is this working and if it is some automagic stuff, why isn't percentages handled automagically in a similar manner?