CommunityToolkit / CommunityToolkit/dotnet
Discussion on Requirements and Solutions for Unified Monitoring of Attribute Value Changes
- Dominant language
- C#
- Stars
- 3.8k
- Forks
- 400
- PR merge metrics
- No merged PRs in 30d
Description
### 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
Contributor guide
Assessment
This issue has not been assessed yet.