Fix #17674: OneWay binding fails to update target after local change by martimclaudino · Pull Request #20964 · AvaloniaUI/Avalonia (original) (raw)
…al change
When a OneWay binding target is modified locally (e.g., via user interaction on a ToggleButton), subsequent PropertyChanged events from the source were being ignored. This occurred because the binding expression incorrectly suppressed the update.
This patch modifies UntypedBindingExpressionBase to ensure that OneWay bindings always propagate changes from the source to the target, overriding any previous local changes. Unit tests were also added to prevent future regressions on this behavior.
Signed-off-by: Martim Claudino martimffclaudino@tecnico.ulisboa.pt
MrJul mentioned this pull request
3 tasks
…nd clean usings
Signed-off-by: Martim Claudino martimffclaudino@tecnico.ulisboa.pt
martimclaudino changed the title
Fix #20816: OneWay binding fails to update target after local change Fix #17674: OneWay binding fails to update target after local change
MrJul pushed a commit to MrJul/Avalonia that referenced this pull request
…al change (AvaloniaUI#20964)
- Fix AvaloniaUI#20816: OneWay binding fails to update target after local change
When a OneWay binding target is modified locally (e.g., via user interaction on a ToggleButton), subsequent PropertyChanged events from the source were being ignored. This occurred because the binding expression incorrectly suppressed the update.
This patch modifies UntypedBindingExpressionBase to ensure that OneWay bindings always propagate changes from the source to the target, overriding any previous local changes. Unit tests were also added to prevent future regressions on this behavior.
Signed-off-by: Martim Claudino martimffclaudino@tecnico.ulisboa.pt
- fix: scope forceUpdate to OneWay mode, use SetCurrentValue in tests and clean usings
Signed-off-by: Martim Claudino martimffclaudino@tecnico.ulisboa.pt
Signed-off-by: Martim Claudino martimffclaudino@tecnico.ulisboa.pt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})