data binding - strange Problem with WPF Textbox stringformat - Cursor moves back -


I am using WPF 4.0 textbox and binding. I am using StringFormat to format numbers as currency. XAM looks like this:

  & lt; Text box text = "{binding path = value credentials, valid oddeters = true, manneon expansions = true, string formatting = {} {0: c}, updatesSource trigger = property changelog}" & gt; & Lt; / Text box & gt;  

Everything works well except for a strange behavior: for example when the user types 12: Just after typing, the value in the text box becomes $ 1.00 And the strange thing is that the cursor is transferred between $ and 1. So when a user is in only 12 types, the result becomes $ 21.00.

How can I correct this weird behavior?

<

I will change my back for the default of LostFocus (TextBox).

To set it up, PropertyChanged, you are compelling your identity and string format, every time the user types a character

if you default it (or it The lost hollow clearly sets out), then formatting + authentication will occur when the user will finish typing entirely from string formatting to insert new characters, break the strange situation, and other issues These words that will make you eliminate awkward problems caused by the property will use Chenjed.


Comments