private static bool SearchForAnimationsInTriggers(DocumentCompositeNode elementNode, IPropertyId triggersProperty, DocumentNode pathNameNode) { bool flag; IProperty property = elementNode.Context.TypeResolver.ResolveProperty(triggersProperty); if (property != null) { DocumentCompositeNode item = elementNode.Properties[property] as DocumentCompositeNode; if (item != null && item.Children != null) { using (IEnumerator <DocumentNode> enumerator = item.FindPointAnimationDescendantNodes().GetEnumerator()) { while (enumerator.MoveNext()) { if (!PathGeometrySerializationHelper.DoesAnimationTargetPath(pathNameNode, enumerator.Current)) { continue; } flag = true; return(flag); } return(false); } return(flag); } } return(false); }
private static bool SearchForAnimationsInVisualStateGroups(DocumentCompositeNode elementNode, DocumentNode pathNameNode) { bool flag; IPropertyId member = (IPropertyId)ProjectNeutralTypes.VisualStateManager.GetMember(MemberType.AttachedProperty, "VisualStateGroups", MemberAccessTypes.Public); IProperty property = elementNode.Context.TypeResolver.ResolveProperty(member); if (property != null) { DocumentCompositeNode item = elementNode.Properties[property] as DocumentCompositeNode; if (item != null && item.Children != null) { using (IEnumerator <DocumentNode> enumerator = item.FindPointAnimationDescendantNodes().GetEnumerator()) { while (enumerator.MoveNext()) { if (!PathGeometrySerializationHelper.DoesAnimationTargetPath(pathNameNode, enumerator.Current)) { continue; } flag = true; return(flag); } return(false); } return(flag); } } return(false); }
private static bool SearchForAnimationsInResources(DocumentCompositeNode elementNode, DocumentNode pathNameNode) { bool flag; DocumentCompositeNode resources = null; ISupportsResources resourcesCollection = ResourceNodeHelper.GetResourcesCollection(elementNode); if (resourcesCollection != null) { resources = resourcesCollection.Resources; } if (resources != null) { using (IEnumerator <DocumentNode> enumerator = resources.ChildNodes.GetEnumerator()) { while (enumerator.MoveNext()) { DocumentCompositeNode current = enumerator.Current as DocumentCompositeNode; if (current == null) { continue; } DocumentNode item = current.Properties[KnownProperties.DictionaryEntryValueProperty]; if (item == null || !PlatformTypes.Storyboard.IsAssignableFrom(item.Type)) { continue; } using (IEnumerator <DocumentNode> enumerator1 = item.FindPointAnimationDescendantNodes().GetEnumerator()) { while (enumerator1.MoveNext()) { if (!PathGeometrySerializationHelper.DoesAnimationTargetPath(pathNameNode, enumerator1.Current)) { continue; } flag = true; return(flag); } } } return(false); } return(flag); } return(false); }