Guest User

Untitled

a guest
Jun 18th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. public class VM :INotifyPropertyChanged
  2. {
  3. public event PropertyChangedEventHandler PropertyChanged;
  4.  
  5. private string _value;
  6. public string Value
  7. {
  8. get
  9. {
  10. return _value;
  11. }
  12. set
  13. {
  14. _value = value;
  15. PropertyChanged.Raise("Value");
  16. }
  17. }
  18. }
  19.  
  20. public static class EventExtensions
  21. {
  22. public static void Raise(this PropertyChangedEventHandler changeEvent, string property)
  23. {
  24. changeEvent.Invoke(changeEvent.Target, new PropertyChangedEventArgs(property));;
  25. }
  26. }
Add Comment
Please, Sign In to add comment