示例#1
0
 // Receive a new inheritance context (this will be a FE/FCE)
 internal override void AddInheritanceContext(DependencyObject context, DependencyProperty property)
 {
     InheritanceContextHelper.AddInheritanceContext(context,
                                                    this,
                                                    ref _hasMultipleInheritanceContexts,
                                                    ref _inheritanceContext);
 }
示例#2
0
        // Receive a new inheritance context (this will be a FE/FCE)
        internal override void AddInheritanceContext(DependencyObject context, DependencyProperty property)
        {
            // remember which property caused the context - BindingExpression wants to know
            // (this must happen before calling AddInheritanceContext, so that the answer
            // is ready during the InheritanceContextChanged event)
            if (!_hasMultipleInheritanceContexts && _inheritanceContext == null)
            {
                _propertyForInheritanceContext = property;
            }
            else
            {
                _propertyForInheritanceContext = null;
            }

            InheritanceContextHelper.AddInheritanceContext(context,
                                                           this,
                                                           ref _hasMultipleInheritanceContexts,
                                                           ref _inheritanceContext);
        }