A better way to write MVVM boilerplate code?
I have found myself recently writing a lot of boilerplate MVVM code and wonder if there is a fancy way to get around writing it all? I already use a ViewModelBase class that implements INotifyPropertyChanged but that doesnt solve the problem of having to write all the accessor code etc. Perhaps by writing a custom attribute that does this, or via a templating system? public MyClass : ViewModelBase { private int someVariable; public int SomeVariable { get { return this.someVariable; } set { this.someVariable = value; this.NotifyPropertyChanged("SomeVariable"); } } } I have a snippet that i use