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

INotifyPropertyChanged attribute, the "How to use them" section is unclear #288

Open
yannduran opened this issue Jun 12, 2023 · 0 comments
Labels
dotnet The .NET Community Toolkit dotnet-communitytoolkit/prod mvvm MVVM Toolkit Pri1

Comments

@yannduran
Copy link

Using any of these attributes is pretty straightforward: just add them to a partial class and all the code from the corresponding types will automatically be generated into that type

The code example shows exactly that, and it appears that no further code needs to be written.

This will generate a complete INotifyPropertyChanged implementation into the MyViewModel type, complete with additional helpers (such as SetProperty) that can be used to reduce verbosity

This paragraph seems to be saying that we have might still have to write code that uses the "helper methods" to reduce the verbosity in our code. If that's not what was intended it should be made clear that we don't have to write any further code when adding [InotifyProperty] to a class. The phrase "with additional helpers (such as SetProperty) that can be used to reduce verbosity" is what raises doubt about whether we still have to write our own code that uses these helper methods.

Hopefully this will help people understand this topic better.


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dotnet The .NET Community Toolkit dotnet-communitytoolkit/prod mvvm MVVM Toolkit Pri1
Projects
None yet
Development

No branches or pull requests

2 participants