ComponentFactory.Quicksilver.Layout.NewPositionAnimate.ApplyAnimation C# (CSharp) Method

ApplyAnimation() public method

Perform animation effects on the set of children.
public ApplyAnimation ( string animateId, MetaPanelBase metaPanel, MetaElementStateDict stateDict, ICollection elements, double elapsedMilliseconds ) : void
animateId string Identifier of the animate to be used.
metaPanel MetaPanelBase Reference to owning panel instance.
stateDict MetaElementStateDict Dictionary of per-element state.
elements ICollection Collection of elements to be animated.
elapsedMilliseconds double Elapsed milliseconds since last animation cycle.
return void
        public override void ApplyAnimation(string animateId,
                                            MetaPanelBase metaPanel,
                                            MetaElementStateDict stateDict,
                                            ICollection elements,
                                            double elapsedMilliseconds)
        {
            // Only apply if we match the incoming animate identifier
            if (string.IsNullOrEmpty(Id) || Id.Equals(animateId))
            {
                foreach (UIElement element in elements)
                {
                    MetaElementState elementState = stateDict[element];

                    // If this is a new element that has not had its current rectangle set
                    if ((elementState.Status == MetaElementStatus.New) && elementState.NewCalculating)
                    {
                        elementState.CurrentRect = RectFromSize(Size, RectFromLocation(Location, metaPanel, elementState), elementState);
                        elementState.TargetChanged = true;
                        elementState.AnimateComplete = false;
                    }
                }
            }

            // Let base class take care of easing animations
            base.ApplyAnimation(animateId, metaPanel, stateDict, elements, elapsedMilliseconds);
        }