private void BindingSourceModel_PropertyChanged(object sender, PropertyChangedEventArgs e) { IBindingSourceModel bindingSourceModel = (IBindingSourceModel)sender; if (!(e.PropertyName == "Path")) { return; } this.CustomBindingExpression = bindingSourceModel.Path; this.UpdateIsBinding(); this.UpdateBindingModes(); this.OnPropertyChanged("IsBindingLegal"); }
private void AddBindingSource(IBindingSourceModel bindingSourceModel) { bindingSourceModel.PropertyChanged += new PropertyChangedEventHandler(this.BindingSourceModel_PropertyChanged); this.bindingSources.Add(bindingSourceModel); }