Gosha
Topic Author
Posts: 8
Joined: 27 Jul 2021, 16:06

Bind textbox to float value. Unable to input dot

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
 StringFormat=N2
, 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:
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?
 
User avatar
sfernandez
Site Admin
Posts: 2984
Joined: 22 Dec 2011, 19:20

Re: Bind textbox to float value. Unable to input dot

31 Aug 2021, 21:51

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?
None of those approaches are supported by Noesis.

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