I have a ViewModel
which inherits from BindableBase
class, it is a class from Prism that implements INotifyPropertyChanged
.
public class MyViewModel : BindableBase { }
I have a Property that uses SetProperty
method to notify the UI with any changes.
private ClassA _sourceA;
public ClassA SourceA {
get { return _sourceA; }
set { SetProperty(ref _sourceA, value); }
}
The property is a reference from another source
object from code behind.
private void UpdateView(ClassA source) {
SourceA = source;// the source object does not implement INotifyPropertyChanged
}
When user changes one value from the UI XAML
, some other values will be changed accordingly in the source
object from code behind.
How to update the UI when the source
(from UpdateView method) object gets updated?