Exemple #1
0
        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);
        }
Exemple #2
0
        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);
        }