public static bool CreateAttachedPropertyDataDescriptor(INamespaceHandler namespaceHandler, object targetObj, string propertyProvider, string propertyName, out DefaultAttachedPropertyDataDescriptor result) { result = null; if (targetObj == null) throw new NullReferenceException("Target object 'null' is not supported"); if (!namespaceHandler.HasAttachedProperty(propertyProvider, propertyName, targetObj)) return false; result = new DefaultAttachedPropertyDataDescriptor(namespaceHandler, targetObj, propertyProvider, propertyName); return true; }
public static bool CreateAttachedPropertyDataDescriptor(INamespaceHandler namespaceHandler, object targetObj, string propertyProvider, string propertyName, out DefaultAttachedPropertyDataDescriptor result) { result = null; if (targetObj == null) { throw new NullReferenceException("Target object 'null' is not supported"); } if (!namespaceHandler.HasAttachedProperty(propertyProvider, propertyName, targetObj)) { return(false); } result = new DefaultAttachedPropertyDataDescriptor(namespaceHandler, targetObj, propertyProvider, propertyName); return(true); }