.NET Community Toolkit is a collection of helpers and APIs that work for all .NET developers and are agnostic of any specific UI platform. The toolkit is maintained and published by Microsoft, and part of the .NET Foundation.
Currently, if there is a field attributed as [ObservableProperty], the source generator will generate a property with a public setter and a public getter. I'm wondering if there is a way to have an observable property with a private setter, since some of them might only be affected by something inside the view models, and the views should never have the access.
Overview
Currently, if there is a field attributed as
[ObservableProperty]
, the source generator will generate a property with a public setter and a public getter. I'm wondering if there is a way to have an observable property with a private setter, since some of them might only be affected by something inside the view models, and the views should never have the access.Usage example
Breaking change?
No
Additional context
Actually I'm not really familiar with the mvvm pattern. So if there are any problem, please forgive me and let me know about that. Thanks a lot!
Help us help you
Yes, I'd like to be assigned to work on this item