//------------------------------------------------------ // // Private Methods // //------------------------------------------------------ // Create a BindingExpression for position i BindingExpressionBase AttachBindingExpression(int i, bool replaceExisting) { DependencyObject target = TargetElement; if (target == null) { return(null); } BindingBase binding = ParentPriorityBinding.Bindings[i]; BindingExpressionBase bindExpr = binding.CreateBindingExpression(target, TargetProperty, this); if (replaceExisting) // replace exisiting or add as new binding? { MutableBindingExpressions[i] = bindExpr; } else { MutableBindingExpressions.Add(bindExpr); } bindExpr.Attach(target, TargetProperty); return(bindExpr); }
// Token: 0x06001C85 RID: 7301 RVA: 0x00086094 File Offset: 0x00084294 private BindingExpressionBase AttachBindingExpression(int i, bool replaceExisting) { DependencyObject targetElement = base.TargetElement; if (targetElement == null) { return(null); } BindingBase bindingBase = this.ParentPriorityBinding.Bindings[i]; BindingExpressionBase bindingExpressionBase = bindingBase.CreateBindingExpression(targetElement, base.TargetProperty, this); if (replaceExisting) { this.MutableBindingExpressions[i] = bindingExpressionBase; } else { this.MutableBindingExpressions.Add(bindingExpressionBase); } bindingExpressionBase.Attach(targetElement, base.TargetProperty); return(bindingExpressionBase); }