CommunityToolkit icon indicating copy to clipboard operation
CommunityToolkit copied to clipboard

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

Open yannduran opened this issue 1 year ago • 0 comments

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.

yannduran avatar Jun 12 '23 05:06 yannduran