Beispiel #1
0
 protected virtual void OnChanged(object sender, PropertyChangedEventArgs e)
 {
     if(PropertyChanged != null)
     {
         PropertyChanged(sender, e);
     }
 }
Beispiel #2
0
 private void Message(object sender, PropertyChangedEventArgs e)
 {
     switch(e.ChangedProperty)
     {
         case "Name":
             Console.WriteLine("Property changed: Name (From {0} to {1}).", e.PreviousName, e.Name);
             break;
         case "Age":
             Console.WriteLine("Property changed: Age (from {0} to {1}).", e.PreviousAge, e.Age);
             break;
     }
 }