You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In actual projects, there is often a requirement to record the old and new values of an attribute when its value changes (e.g., monitoring personnel changing parameters in the industrial field). In CommunityToolkit.MVVM, each property has its own OnXXXChanged(oldValue, newValue) method. However, this means I need to write n such functions to achieve the above functionality, which is not ideal. Is it possible to add a callback OnPropertyValueChanged(propertyName,oldValue, newValue)?
Overview
In actual projects, there is often a requirement to record the old and new values of an attribute when its value changes (e.g., monitoring personnel changing parameters in the industrial field). In CommunityToolkit.MVVM, each property has its own OnXXXChanged(oldValue, newValue) method. However, this means I need to write n such functions to achieve the above functionality, which is not ideal. Is it possible to add a callback OnPropertyValueChanged(propertyName,oldValue, newValue)?
API breakdown
OnPropertyValueChanged(propertyName,oldValue, newValue)
Usage example
Not
Breaking change?
No
Alternatives
Not
Additional context
No response
Help us help you
No, just wanted to propose this
The text was updated successfully, but these errors were encountered: