コード例 #1
0
 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;
 }
コード例 #2
0
 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);
 }