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

Discussion on Requirements and Solutions for Unified Monitoring of Attribute Value Changes #894

Open
lintao185 opened this issue Jun 27, 2024 · 0 comments
Labels
feature request 📬 A request for new changes to improve functionality

Comments

@lintao185
Copy link

lintao185 commented Jun 27, 2024

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

@lintao185 lintao185 added the feature request 📬 A request for new changes to improve functionality label Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request 📬 A request for new changes to improve functionality
Projects
None yet
Development

No branches or pull requests

1 participant