internal override void HandlePropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)
        {
            DependencyProperty dp = args.Property;

            if (TraceData.IsExtendedTraceEnabled(this, TraceDataLevel.Events))
            {
                TraceData.Trace(TraceEventType.Warning,
                                TraceData.GotPropertyChanged(
                                    TraceData.Identify(this),
                                    TraceData.Identify(d),
                                    dp.Name));
            }

            for (int i = 0; i < AttentiveBindingExpressions; ++i)
            {
                BindingExpressionBase bindExpr = MutableBindingExpressions[i];
                DependencySource[]    sources  = bindExpr.GetSources();
                if (sources != null)
                {
                    for (int j = 0; j < sources.Length; ++j)
                    {
                        DependencySource source = sources[j];
                        if (source.DependencyObject == d && source.DependencyProperty == dp)
                        {
                            bindExpr.OnPropertyInvalidation(d, args);
                            break;
                        }
                    }
                }
            }
        }
        // Token: 0x06001C88 RID: 7304 RVA: 0x000861BC File Offset: 0x000843BC
        internal override void HandlePropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)
        {
            DependencyProperty property = args.Property;

            if (TraceData.IsExtendedTraceEnabled(this, TraceDataLevel.Transfer))
            {
                TraceData.Trace(TraceEventType.Warning, TraceData.GotPropertyChanged(new object[]
                {
                    TraceData.Identify(this),
                    TraceData.Identify(d),
                    property.Name
                }));
            }
            for (int i = 0; i < this.AttentiveBindingExpressions; i++)
            {
                BindingExpressionBase bindingExpressionBase = this.MutableBindingExpressions[i];
                DependencySource[]    sources = bindingExpressionBase.GetSources();
                if (sources != null)
                {
                    foreach (DependencySource dependencySource in sources)
                    {
                        if (dependencySource.DependencyObject == d && dependencySource.DependencyProperty == property)
                        {
                            bindingExpressionBase.OnPropertyInvalidation(d, args);
                            break;
                        }
                    }
                }
            }
        }
Exemple #3
0
        // Token: 0x06001C3C RID: 7228 RVA: 0x00084C44 File Offset: 0x00082E44
        internal override void HandlePropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)
        {
            DependencyProperty property = args.Property;

            if (TraceData.IsExtendedTraceEnabled(this, TraceDataLevel.Transfer))
            {
                TraceData.Trace(TraceEventType.Warning, TraceData.GotPropertyChanged(new object[]
                {
                    TraceData.Identify(this),
                    TraceData.Identify(d),
                    property.Name
                }));
            }
            bool flag = true;

            base.TransferIsDeferred = true;
            if (base.UsesLanguage && d == base.TargetElement && property == FrameworkElement.LanguageProperty)
            {
                base.InvalidateCulture();
                base.NeedsDataTransfer = true;
            }
            if (base.IsDetached)
            {
                return;
            }
            int count = this.MutableBindingExpressions.Count;

            for (int i = 0; i < count; i++)
            {
                BindingExpressionBase bindingExpressionBase = this.MutableBindingExpressions[i];
                if (bindingExpressionBase != null)
                {
                    DependencySource[] sources = bindingExpressionBase.GetSources();
                    if (sources != null)
                    {
                        foreach (DependencySource dependencySource in sources)
                        {
                            if (dependencySource.DependencyObject == d && dependencySource.DependencyProperty == property)
                            {
                                bindingExpressionBase.OnPropertyInvalidation(d, args);
                                break;
                            }
                        }
                    }
                    if (bindingExpressionBase.IsDisconnected)
                    {
                        flag = false;
                    }
                }
            }
            base.TransferIsDeferred = false;
            if (flag)
            {
                this.Transfer();
                return;
            }
            this.Disconnect();
        }