private void MentorDataContextChanged(object sender, DataContextChangedEventArgs e) { if (this.weakListener == null) { return; } IDataContextChangedListener target = this.weakListener.Target as IDataContextChangedListener; if (target == null) { this.Disconnect(); return; } target.OnDataContextChanged(sender, e); }
private void DataContextChanged(object sender, DataContextChangedEventArgs e) { ((IDataContextChangedListener)this).OnDataContextChanged(sender, e); }
void IDataContextChangedListener.OnDataContextChanged(object sender, DataContextChangedEventArgs e) { if (this.targetDO == null) { return; } object dataContext = this.GetDataContext(this.TargetElement); if (e.ChangeReason == DataContextChangedReason.EnteringLiveTree || dataContext != this.SourceForBinding) { this.ResetNotifyDataErrorInfo(); this.lastSourceUpdateThrewException = false; this.SourceForBinding = dataContext; this.SourceAcquired(); } }