Open karmeye opened 7 months ago
I copypasted the line you mentioned in a REPL console, and it works as expected. Are you sure you are not triggering something else that is causing the OnPropertyChanged
to being called?
Ok, what happens is that the first time I tab out of the text box, Text
(i.e. the binding) is null
and this triggers PropertyChanged
, as null
and empty string is not considered equal. Just by tabbing in and out of the text box, the textbox changes the binding value from null
to empty string. After that OnPropertyChanged
is not called any more.
I guess we can remove the bug
label.
I don't really want the TextBox
to change the value, as it is represented as null
rather than empty string
in the database.
Is there a way to conditionally prevent a control from updating the binding?
Describe the bug
The following returns false even though both are empty strings
Regression
No response
Steps to reproduce
Expected behavior
PropertyChanged should not be triggered when the new value is an empty string for a current empty string value.
Screenshots
No response
IDE and version
VS 2022
IDE version
No response
Nuget packages
Nuget package version(s)
8.2.2
Additional context
No response
Help us help you
No, just wanted to report this