// TODO: (PS) Comment this. public static void SetValueForSource(this BindingBase subject, object value) { if (subject == null) { throw new ArgumentNullException("subject"); } DependencyPropertyProvider propertyProvider = new DependencyPropertyProvider(); BindingBase clone = subject.Clone(); SetMode(clone, BindingMode.OneWayToSource); BindingOperations.SetBinding(propertyProvider, DependencyPropertyProvider.PropertyValueProperty, clone); propertyProvider.PropertyValue = value; BindingOperations.ClearBinding(propertyProvider, DependencyPropertyProvider.PropertyValueProperty); }