public override bool SetValue(object o, string propertyName, object value) { var ui = o as UIElement; if (ui != null) { ui.SetValue(propertyName, value, true); } else { RuntimeUtil.SetPropertyValue(o, propertyName, value); } return(true); }
public override bool SetValue(object o, string propertyName, object value) { var d = o as DependencyObject; if (d != null) { if (_targetProperty != null) { SetValue(d, _targetProperty, value); } else { d.SetValue(propertyName, value); } } else { RuntimeUtil.SetPropertyValue(o, propertyName, value); } return(true); }