internal override bool ClearValueCore(int key) { if (!this.trackPropertyChanging && !this.trackPropertyChanged) { return(base.ClearValueCore(key)); } object currentValue = this.GetValue(key); RadPropertyEventArgs args = new RadPropertyEventArgs(key, currentValue, null); if (this.trackPropertyChanging) { this.OnPropertyChanging(args); if (args.Cancel) { return(false); } } this.propertyStore.RemoveEntry(key); if (this.trackPropertyChanged) { this.OnPropertyChanged(args); } return(true); }
internal override bool SetValueCore(int key, object value) { if (!this.trackPropertyChanging && !this.trackPropertyChanged) { return(base.SetValueCore(key, value)); } object currentValue = this.GetValue(key); if (object.Equals(currentValue, value)) { return(false); } RadPropertyEventArgs args = new RadPropertyEventArgs(key, currentValue, value); if (this.trackPropertyChanging) { this.OnPropertyChanging(args); if (args.Cancel) { return(false); } } this.propertyStore.SetEntry(key, value); if (this.trackPropertyChanged) { this.OnPropertyChanged(args); } return(true); }
internal virtual void OnPropertyChanging(RadPropertyEventArgs e) { if (!this.IsTreeLoaded) { return; } Message message = new Message(PropertyChangingMessage, e, this.GetMessageDispatchMode(PropertyChangingMessage)); this.DispatchMessage(message); }
internal virtual void OnPropertyChanged(RadPropertyEventArgs e) { if (!this.IsTreeLoaded) { return; } Message message = new Message(PropertyChangedMessage, e, this.GetMessageDispatchMode(PropertyChangingMessage)); this.DispatchMessage(message); // raise the system PropertyChanged event this.RaisePropertyChanged(e.PropertyName, e.Key); }