Bind textbox to float value. Unable to input dot
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?
-
sfernandez
Site Admin
- Posts: 2984
- Joined:
Re: Bind textbox to float value. Unable to input dot
None of those approaches are supported by Noesis.System.Windows.FrameworkCompatibilityPreferences.KeepTextBoxDisplaySynchronizedWithTextProperty = false;
Can I do something like this in noesis with c++?
I also read about the solution with writing my own validator. Is this supported?
The best option is using a Converter so you can decide how to deal with a leading or trailing dot.
Who is online
Users browsing this forum: Google [Bot] and 76 guests