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

ObservableObject Attribute Explanation Not Clear #287

Open
yannduran opened this issue Jun 11, 2023 · 0 comments
Open

ObservableObject Attribute Explanation Not Clear #287

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

Comments

@yannduran
Copy link

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.

@michael-hawker michael-hawker added dotnet The .NET Community Toolkit mvvm MVVM Toolkit labels Aug 25, 2023
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