Exemple #1
0
 private void HandleValueChange(object sender, NMF.Expressions.ValueChangedEventArgs eventArgs)
 {
     System.Collections.Specialized.NotifyCollectionChangedEventArgs collectionEvent = null;
     if ((eventArgs.NewValue != null))
     {
         if ((eventArgs.OldValue != null))
         {
             collectionEvent = new System.Collections.Specialized.NotifyCollectionChangedEventArgs(System.Collections.Specialized.NotifyCollectionChangedAction.Replace, eventArgs.NewValue, eventArgs.OldValue);
         }
         else
         {
             collectionEvent = new System.Collections.Specialized.NotifyCollectionChangedEventArgs(System.Collections.Specialized.NotifyCollectionChangedAction.Add, eventArgs.NewValue);
         }
     }
     else
     {
         collectionEvent = new System.Collections.Specialized.NotifyCollectionChangedEventArgs(System.Collections.Specialized.NotifyCollectionChangedAction.Remove, eventArgs.OldValue);
     }
     this.OnCollectionChanged(collectionEvent);
 }
Exemple #2
0
 private void Element_ParentChanged(object sender, ValueChangedEventArgs e)
 {
     if (Child != null)
     {
         Child.Detach();
     }
     RenewChild();
 }
Exemple #3
0
 protected virtual void OnValueChanged(ValueChangedEventArgs e)
 {
     ValueChanged?.Invoke(this, e);
 }