PropertyChangeNotifier.cs 642 B

123456789101112131415161718
  1. // Copyright (c) The Perspex Project. All rights reserved.
  2. // Licensed under the MIT license. See licence.md file in the project root for full license information.
  3. using System.ComponentModel;
  4. using System.Runtime.CompilerServices;
  5. namespace Perspex.Xaml.Base.UnitTest.SampleModel
  6. {
  7. public abstract class PropertyChangeNotifier : INotifyPropertyChanged
  8. {
  9. public event PropertyChangedEventHandler PropertyChanged;
  10. protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
  11. {
  12. PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
  13. }
  14. }
  15. }