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);
 }
Ejemplo n.º 2
0
 private void DataContextChanged(object sender, DataContextChangedEventArgs e)
 {
     ((IDataContextChangedListener)this).OnDataContextChanged(sender, e);
 }
Ejemplo n.º 3
0
        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();
            }
        }