CommunityToolkit icon indicating copy to clipboard operation
CommunityToolkit copied to clipboard

ObservableObject Attribute Explanation Not Clear

Open yannduran opened this issue 1 year ago • 0 comments

In order to work, annotated fields need to be in a partial class with the necessary INotifyPropertyChanged infrastructure.

This is not clear. What is the "necessary INotifyPropertyChanged infrastructure."? Do you mean the class needs to have an INotifyPropertyChanged attribute? If so, you should just say that. If not this needs further explanation.

If the type is nested, all types in the declaration syntax tree must also be annotated as partial. Not doing so will result in a compile errors, as the generator will not be able to generate a different partial declaration of that type with the requested observable property.

This is also not clear. What does "all types in the declaration syntax tree" mean? If you just mean that all nested types must also be declared partial, again just say that. If not, this needs further explanation.

I certainly need to know the answer to these questions, but I hope it will make the documentation clearer for others as well.


Document Details

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

yannduran avatar Jun 11 '23 13:06 yannduran