Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invoking OnPropertyChanged without changing the object property doesn't invoke Converter in MultiBinding #16446

Closed
Zaspard opened this issue Jul 24, 2024 · 2 comments
Labels

Comments

@Zaspard
Copy link

Zaspard commented Jul 24, 2024

Describe the bug

ViewModel has two properties object (some class) and struct (bool).
When OnPropertyChanged is invoked without changing the object property Converter in MultiBinding is not invoked. But when OnPropertyChanged is invoked without changing the struct property, there is no such problem.
The same problem does not occur when invoking Converter in Binding for both object and struct.

To Reproduce

Project for test: Example.zip

  1. Run project
  2. Click on "UpdateObjectForMultiValueConverter" button

Expected behavior

OnPropertyChanged invoked Converter in MultiBinding

Avalonia version

11.1.0, master brunch

OS

Windows

Additional context

This happens because false is written to the hasValueChanged variable in PublishValue() (class UntypedBindingExpressionBase) and then the notification is ignored in _sink.
image

It is true that the object has not been changed because we have not updated it in property, but we wanted to make View redraw by invoking OnPropertyChanged.
When invoking OnPropertyChanged for a Binding this code is not used, so there is no such problem

Problem with MultiBinding is not observed in version 10.0.10

@Zaspard Zaspard added the bug label Jul 24, 2024
@workgroupengineering
Copy link
Contributor

Thinking is the same issue of #16084

@maxkatz6
Copy link
Member

Closing as a duplicate of #16084

@maxkatz6 maxkatz6 closed this as not planned Won't fix, can't repro, duplicate, stale Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants