Another solution I used to solve the problem: first set the value and then call PropertyChangedEventArgs , adding the Set function to my ViewModelBase , which looks like this:
public class ViewModelBase : INotifyPropertyChanged { protected bool Set<T>(ref T backingField, T value, [CallerMemberName] string propertyname = null) {
Instead of this:
public string Name { get { return PersonEntity.Name; } set { PersonEntity.Name = value; RaisePropertyChanged("Name"); }
Now you can achieve the same by doing this:
public string Name { get { return PersonEntity.Name; } set { Set(ref PersonEntity.Name,value); }
JoshuaRMS Jul 25 '19 at 20:23 2019-07-25 20:23
source share