public static bool IsPropertyOrFieldADictionary(XElement propertyElement, ReflectionOnSeparateAppDomainHandler reflectionOnSeparateAppDomain, bool isAttachedProperty)
 {
     if (isAttachedProperty)
     {
         string methodName = "Get" + propertyElement.Name.LocalName.Split('.')[1];                           // In case of attached property, we check the return type of the method "GetPROPERTYNAME()". For example, in case of "Grid.Row", we check the return type of the method "Grid.GetRow()".
         XName  elementName = propertyElement.Name.Namespace + propertyElement.Name.LocalName.Split('.')[0]; // eg. if the propertyElement is <VisualStateManager.VisualStateGroups>, this will be "DefaultNamespace+VisualStateManager"
         string namespaceName, localName, assemblyNameIfAny;
         GetClrNamespaceAndLocalName(elementName, out namespaceName, out localName, out assemblyNameIfAny);
         return(reflectionOnSeparateAppDomain.DoesMethodReturnADictionary(methodName, namespaceName, localName, assemblyNameIfAny));
     }
     else
     {
         var    propertyOrFieldName = propertyElement.Name.LocalName.Split('.')[1];
         var    parentElement = propertyElement.Parent;
         string parentNamespaceName, parentLocalName, parentAssemblyNameIfAny;
         GetClrNamespaceAndLocalName(parentElement.Name, out parentNamespaceName, out parentLocalName, out parentAssemblyNameIfAny);
         return(reflectionOnSeparateAppDomain.IsPropertyOrFieldADictionary(propertyOrFieldName, parentNamespaceName, parentLocalName, parentAssemblyNameIfAny));
     }
 }