protected virtual void OnPropertyChanged(string propertyName, object oldValue, object newValue) { switch (propertyName) { case Properties.EXPRESSION: case Properties.DETAILROWSEXPRESSION: case Properties.DEFAULTDETAILROWSEXPRESSION: case Properties.FILTEREXPRESSION: case Properties.STATUSEXPRESSION: case Properties.TARGETEXPRESSION: case Properties.TRENDEXPRESSION: case Properties.FORMATSTRINGEXPRESSION: expressionChangeCounter += Handler.UndoManager.IsUndoing ? -1 : 1; break; } PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); Handler.DoObjectChanged(this, propertyName, oldValue, newValue); // Below seems to cause a lot of flickering, since every property change will fire it. // However, it should only be fired for property changes that require an UI update, and // this has already been taken care of by calling the method suitable places within the // individual property setters (such as the setter for Name, IsHidden, etc.): // Handler.UpdateObject(this); }
protected virtual void OnPropertyChanged(string propertyName, object oldValue, object newValue) { PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); Handler.DoObjectChanged(this, propertyName, oldValue, newValue); // Below seems to cause a lot of flickering, since every property change will fire it. // However, it should only be fired for property changes that require an UI update, and // this has already been taken care of by calling the method suitable places within the // individual property setters (such as the setter for Name, IsHidden, etc.): // Handler.UpdateObject(this); }
void OnPropertyChanged(string propertyName, object oldValue, object newValue) { PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); Handler.DoObjectChanged(this, propertyName, oldValue, newValue); }