It makes most sense to outsource.
Write a class ( ObservableObject) with the following code:
class ObservableObject : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
protected void OnPropertyChanged(string name)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));
}
}
All classes derived from this class can access the method, thanks to protected.
Example:
class Example : ObservableObject
{
//propfull
private string name;
public string Name
{
get {return name;}
set
{
name = value;
OnPropertyChanged(nameof(Name));
}
}
}