// 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); }
// 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); }