UpdateSourceTrigger=PropertyChanged option means that your source property is updated every time you press a key in the
When you type a . character, one of two things will happen:
- The box is currently empty.
"." on its own cannot be parsed as a
decimal, so the property will not be updated.
- The box contains an integer:
- The property is updated to
42, triggering the
- The binding on the box updates to reflect the new property value - the text is set to
Depending on what you are trying to do, there may be ways around this - for example, manually updating the source value when the user presses Enter:
c# - Binding to a double with StringFormat on a TextBox - Stack Overflow[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."