protected static Action <object> GetObjectPropertySetter(object target, string property, bool?throwExcepctionOnNotFound = null)
        {
            PropertyInfo targetPropertyInfo = ObjectPropertyHelper.GetPropertyInfoSetter(target, property);

            targetPropertyInfo = targetPropertyInfo ?? ObjectPropertyHelper.GetPropertyInfo(target, property,
                                                                                            BindingFlags.Public | BindingFlags.SetProperty | BindingFlags.NonPublic | BindingFlags.Static);
            if (targetPropertyInfo != null)
            {
                return(x => targetPropertyInfo.SetValue(target, x, null));
            }

            DependencyProperty targetDependencyProperty = ObjectPropertyHelper.GetDependencyProperty(target, property);

            if (targetDependencyProperty != null)
            {
                return(x => ((DependencyObject)target).SetValue(targetDependencyProperty, x));
            }

            if (throwExcepctionOnNotFound.HasValue)
            {
                string message = string.Format(Error_PropertyNotFound, target.GetType().Name, property);
                if (throwExcepctionOnNotFound.Value)
                {
                    throw new ArgumentException(message);
                }
                else
                {
                    System.Diagnostics.Trace.WriteLine(string.Format("MethodBindingBehaviorBase error: {0}", message));
                }
            }

            return(null);
        }
 DependencyProperty GetCommandDependencyProperty(string propName)
 {
     return(ObjectPropertyHelper.GetDependencyProperty(AssociatedObject, propName));
 }