The MVVM Community Toolkit has a source generator for Observable properties that offers a similar experience to this plugin.
It did add a neat feature recently that I would love to have in this plugin. The generator defines a partial method for each property with the attribute, leaving the developer the option to implement said partial method to react to property changes. This is the type of experience you get in Visual Studio:
Currently the OnChange property in the Attribute options requires this syntax:
[AutoBindable(OnChange = nameof(OnMyPropertyChanged))]
readonly int _myProperty;
void OnMyPropertyChanged() {}
With partial methods calls generated, it would looks like this:
The MVVM Community Toolkit has a source generator for Observable properties that offers a similar experience to this plugin.
It did add a neat feature recently that I would love to have in this plugin. The generator defines a partial method for each property with the attribute, leaving the developer the option to implement said partial method to react to property changes. This is the type of experience you get in Visual Studio:
Currently the
OnChange
property in the Attribute options requires this syntax:With partial methods calls generated, it would looks like this:
I would also envision adding the
changing
variant of the property change event.Pros:
Cons: