-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
Method OnPropertyChanged for exposed property is called with old value #511
Comments
Thanks for reporting and the detailed error report. I will investigate this ASAP. Do you have a repo that I can use? E.g. do you have this code in a public repo? |
@Green7 I have written a unit test, but cannot reproduce. Can you double check the unit test is correct? |
I added an extra check to check both the model and view model values: |
the problem occurs if the variable is bound in UI. In such a situation, OnSelectedThemeNameChanged is called with the old value of AppSettings.SelectedThemeName. |
Then it's probably the RaisePropertyChanged, I will try to reproduce this inside a unit test. |
Component
ViewModel
Version of Library
Catel.MVVM 6.0.0-alpha1271
Catel.Fody 4.9.0
Version of OS(s) listed above with issue
Windows 11
Steps to Reproduce
Expected Behavior
OnPropertyChanged should be called after property gets its new value.
Actual Behavior
OnPropertyChanged is called before the property value changes.
But if we get the value of property using dynamic object it will be correct. For example:
Also if we expose property as below:
OnSelectedThemeNameChanged works correctly and has the current value.
The text was updated successfully, but these errors were encountered: