Is there any way to convert Auto property to Notify Property automaticly?
INotifyPropertyChanged
Or any other way for MVVM in WPF
public string Filename { get; set; }
To
string _Filename;
public string Filename {
get { return _Filename; }
set {
if (PropertyChanged != null) {
_Filename = value;
PropertyChanged(this, new PropertyChangedEventArgs("Filename"));
}
}
}
There’s a kindofmagic project that looks close to what you need.
It’s an MSBuild task that processes your assemblies and adds
PropertyChangedcalls to the properties decorated with some[Magic]attribute. I’ve used it a bit and find extremely helpful.