Bind textbox to float value. Unable to input dot
Posted: 31 Aug 2021, 15:16
Hello!
I am facing an issue where the user cannot enter "." in a textbox bound to a floating point value while the UpdateSourceTrigger has a PropertyChanged value.
Of the possible solutions that I have found, there is a use of, but I can't because of design considerations.
And solutions such as adding a delay or adding a custom converter look like a hack.
I found a solution which is to force use .NET 4 behavior:
Can I do something like this in noesis with c++?
I also read about the solution with writing my own validator. Is this supported?
I am facing an issue where the user cannot enter "." in a textbox bound to a floating point value while the UpdateSourceTrigger has a PropertyChanged value.
Of the possible solutions that I have found, there is a use of
Code: Select all
StringFormat=N2
And solutions such as adding a delay or adding a custom converter look like a hack.
I found a solution which is to force use .NET 4 behavior:
Code: Select all
System.Windows.FrameworkCompatibilityPreferences.KeepTextBoxDisplaySynchronizedWithTextProperty = false;
I also read about the solution with writing my own validator. Is this supported?