Example #1
0
        /// <summary>
        /// Consumes a sequence of tokens representing a list of storyboard animations.
        /// </summary>
        /// <param name="state">The parser state.</param>
        /// <returns>A new <see cref="UvssStoryboardAnimationCollection"/> object representing the animation collection that was consumed.</returns>
        private static UvssStoryboardAnimationCollection ConsumeStoryboardAnimationList(UvssParserState state)
        {
            var animation        = default(UvssStoryboardAnimation);
            var animations       = new UvssStoryboardAnimationCollection();
            var animationsTokens = GetTokensBetweenCurlyBraces(state);
            var animationsState  = new UvssParserState(state.Source, animationsTokens);

            while ((animation = ConsumeStoryboardAnimation(animationsState)) != null)
            {
                animations.Add(animation);
            }

            return animations;
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="UvssStoryboardTarget"/> class.
 /// </summary>
 /// <param name="selector">The target's selector.</param>
 /// <param name="filter">The storyboard target's type filter.</param>
 /// <param name="animations">The target's collection of animations.</param>
 internal UvssStoryboardTarget(UvssSelector selector, UvssStoryboardTargetFilter filter, UvssStoryboardAnimationCollection animations)
 {
     this.selector   = selector;
     this.filter     = filter;
     this.animations = animations;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="UvssStoryboardTarget"/> class.
 /// </summary>
 /// <param name="selector">The target's selector.</param>
 /// <param name="filter">The storyboard target's type filter.</param>
 /// <param name="animations">The target's collection of animations.</param>
 internal UvssStoryboardTarget(UvssSelector selector, UvssStoryboardTargetFilter filter, UvssStoryboardAnimationCollection animations)
 {
     this.selector   = selector;
     this.filter     = filter;
     this.animations = animations;
 }