/// <summary> /// Raises the <see cref="PropertyChanged"/> event. /// </summary> /// <param name="property">The property that has changed.</param> /// <param name="oldValue">The old property value.</param> /// <param name="newValue">The new property value.</param> /// <param name="priority">The priority of the binding that produced the value.</param> private void RaisePropertyChanged( PerspexProperty property, object oldValue, object newValue, BindingPriority priority) { Contract.Requires <NullReferenceException>(property != null); PerspexPropertyChangedEventArgs e = new PerspexPropertyChangedEventArgs( this, property, oldValue, newValue, priority); OnPropertyChanged(e); property.NotifyChanged(e); if (PropertyChanged != null) { PropertyChanged(this, e); } if (_inpcChanged != null) { PropertyChangedEventArgs e2 = new PropertyChangedEventArgs(property.Name); _inpcChanged(this, e2); } }
/// <summary> /// Raises the <see cref="PropertyChanged"/> event. /// </summary> /// <param name="property">The property that has changed.</param> /// <param name="oldValue">The old property value.</param> /// <param name="newValue">The new property value.</param> private void RaisePropertyChanged(PerspexProperty property, object oldValue, object newValue) { Contract.Requires <NullReferenceException>(property != null); if (this.PropertyChanged != null) { PerspexPropertyChangedEventArgs e = new PerspexPropertyChangedEventArgs(this, property, oldValue, newValue); property.NotifyChanged(e); this.PropertyChanged(this, e); } if (this.inpcChanged != null) { PropertyChangedEventArgs e = new PropertyChangedEventArgs(property.Name); this.inpcChanged(this, e); } }
/// <summary> /// Raises the <see cref="PropertyChanged"/> event. /// </summary> /// <param name="property">The property that has changed.</param> /// <param name="oldValue">The old property value.</param> /// <param name="newValue">The new property value.</param> /// <param name="priority">The priority of the binding that produced the value.</param> protected void RaisePropertyChanged( PerspexProperty property, object oldValue, object newValue, BindingPriority priority) { Contract.Requires <ArgumentNullException>(property != null); VerifyAccess(); PerspexPropertyChangedEventArgs e = new PerspexPropertyChangedEventArgs( this, property, oldValue, newValue, priority); if (property.Notifying != null) { property.Notifying(this, true); } try { OnPropertyChanged(e); property.NotifyChanged(e); if (PropertyChanged != null) { PropertyChanged(this, e); } if (_inpcChanged != null) { PropertyChangedEventArgs e2 = new PropertyChangedEventArgs(property.Name); _inpcChanged(this, e2); } } finally { if (property.Notifying != null) { property.Notifying(this, false); } } }