/// <summary> /// Visits a storyboard target node. /// </summary> /// <param name="storyboardTarget">The storyboard target node to visit.</param> private void VisitStoryboardTarget(UvssStoryboardTargetSyntax storyboardTarget) { for (int i = 0; i < storyboardTarget.Filters.Count; i++) { var filterNode = storyboardTarget.Filters[i]; Style(filterNode, typeUvssTypeName); } }
/// <summary> /// Compiles a <see cref="UvssStoryboardTarget"/> from the specified syntax node. /// </summary> private static UvssStoryboardTarget CompileStoryboardTarget(UvssStoryboardTargetSyntax node, CultureInfo culture) { var selector = node.Selector == null ? null : CompileSelector(node.Selector); var filter = CompileStoryboardTargetFilter(node.Filters, culture); var animations = new List <UvssStoryboardAnimation>(); for (int i = 0; i < node.Body.Content.Count; i++) { var animationNode = (UvssAnimationSyntax)node.Body.Content[i]; var animation = CompileStoryboardAnimation(animationNode, culture); animations.Add(animation); } return(new UvssStoryboardTarget( selector, filter, new UvssStoryboardAnimationCollection(animations))); }
/// <inheritdoc/> public override SyntaxNode VisitStoryboardTarget(UvssStoryboardTargetSyntax node) { var unchanged = true; var newTargetKeyword = (SyntaxToken)Visit(node.TargetKeyword); if (newTargetKeyword != node.TargetKeyword) { unchanged = false; } var newFilters = VisitSeparatedList(node.Filters); if (newFilters.Node != node.Filters.Node) { unchanged = false; } var newSelector = (UvssSelectorWithParenthesesSyntax)Visit(node.Selector); if (newSelector != node.Selector) { unchanged = false; } var newBody = (UvssBlockSyntax)Visit(node.Body); if (newBody != node.Body) { unchanged = false; } return(unchanged ? node : new UvssStoryboardTargetSyntax( newTargetKeyword, newFilters, newSelector, newBody)); }
/// <summary> /// Visits the specified storyboard target node. /// </summary> /// <param name="node">The node to visit.</param> /// <returns>A node which should replace the visited node, or a reference to the visited node /// itself if no changes were made.</returns> public virtual SyntaxNode VisitStoryboardTarget(UvssStoryboardTargetSyntax node) { return(VisitSyntaxNode(node)); }