Ejemplo n.º 1
0
 private void OnPropertyChange(object sender, PropertyChangedEventArgs args)
 {
     if (this.PropertyChanged != null)
     {
         this.PropertyChanged(sender, args);
     }
 }
Ejemplo n.º 2
0
 protected virtual void OnPropertyChanged(PropertyChangedEventArgs<string> e)
 {
     if (null != this.PropertyChanged)
     {
         this.PropertyChanged(this, e);
     }
 }
Ejemplo n.º 3
0
 protected virtual void OnChanged(object sender, PropertyChangedEventArgs e)
 {
     if (this.PropertyChanged != null)
     {
         this.PropertyChanged(sender, e);
     }
 }
Ejemplo n.º 4
0
 protected virtual void OnChanged(PropertyChangedEventArgs arg)
 {
     if (this.EventChange!=null)
     {
         this.EventChange(arg);
     }
 }
Ejemplo n.º 5
0
 private static void PropertyHandler(object sender, PropertyChangedEventArgs eventArgs)
 {
     Console.WriteLine(
         "Property changed: {0} (from {1} to {2})",
         eventArgs.PropertyName,
         eventArgs.OldValue,
         eventArgs.NewValue);
 }
Ejemplo n.º 6
0
 protected void OnPropertyChanged(string propertyName, dynamic oldValue, dynamic newValue)
 {
     if (this.PropertyChanged != null)
     {
         PropertyChangedEventArgs arg = new PropertyChangedEventArgs(propertyName, oldValue, newValue);
         this.PropertyChanged(this, arg);
     }
 }
Ejemplo n.º 7
0
 private void GetMessage(object sender, PropertyChangedEventArgs e)
 {
     switch (e.ChangedProperty)
     {
         case "Name":
             Console.WriteLine("Property changed: Name (from {1} to {0}).", e.Name, e.OldName);
             break;
         case "Age":
             Console.WriteLine("Property changed: Age (from {1} to {0}).", e.Age, e.OldAge);
             break;
     }
 }