public static IBindingExpression SetBinding(IBindable target, string targetProperty, Binding binding) { if (target == null) throw new ArgumentNullException("target"); if (string.IsNullOrEmpty(targetProperty)) throw new ArgumentNullException("targetProperty"); if (binding == null) throw new ArgumentNullException("binding"); var binderKey =_Bindings.SingleOrDefault((kvp)=>kvp.Key.Object == target && kvp.Key.Property == targetProperty).Key; IBindingExpression bindingExpression = null; object nestedTarget = target; var element = target as Element; PropertyInfo propertyInfo = target.GetType().GetNestedProperty(ref nestedTarget, targetProperty, false); var targetReady = propertyInfo != null && nestedTarget != null; if (targetReady) { if (_BindingExpressions == null) _BindingExpressions = new List<IBindingExpression>(); bindingExpression = GetBindingExpression(target, targetProperty); if (bindingExpression == null) { bindingExpression = new BindingExpression(binding, propertyInfo, nestedTarget) { Element = element }; _BindingExpressions.Add(bindingExpression); var INPC = bindingExpression.Binding.Source as INotifyPropertyChanged; if (INPC != null) { INPC.PropertyChanged -= HandleDataContextPropertyChanged; INPC.PropertyChanged += HandleDataContextPropertyChanged; } } } else { if (binderKey == null) _Bindings.Add(new PropertyBinder() { Object = target, Property = targetProperty }, binding); else _Bindings[binderKey] = binding; } return bindingExpression; }