ViewModelBase.cs 834 B

12345678910111213141516171819202122232425262728293031
  1. using System;
  2. using System.Net;
  3. using System.Windows;
  4. using System.Windows.Controls;
  5. using System.Windows.Documents;
  6. using System.Windows.Ink;
  7. using System.Windows.Input;
  8. using System.Windows.Media;
  9. using System.Windows.Media.Animation;
  10. using System.Windows.Shapes;
  11. using System.ComponentModel;
  12. namespace VocabManager.ViewModel
  13. {
  14. public class ViewModelBase : INotifyPropertyChanged
  15. {
  16. public event PropertyChangedEventHandler PropertyChanged;
  17. protected virtual void OnPropertyChanged(string propertyName)
  18. {
  19. PropertyChangedEventHandler handler = this.PropertyChanged;
  20. if (handler != null)
  21. {
  22. var e = new PropertyChangedEventArgs(propertyName);
  23. handler(this, e);
  24. }
  25. }
  26. }
  27. }