private void UpdateAnimatorTargetSize(SizeAnimator animator, Size targetSize) { string widthAnimator = string.Empty; string heightAnimator = string.Empty; switch (animator) { case SizeAnimator.PhaseIn: widthAnimator = Element.PhaseInWidthAnimator; heightAnimator = Element.PhaseInHeightAnimator; break; case SizeAnimator.Expansion: widthAnimator = Element.ExpandWidthAnimator; heightAnimator = Element.ExpandHeightAnimator; break; case SizeAnimator.Condensation: widthAnimator = Element.CondenseWidthAnimator; heightAnimator = Element.CondenseHeightAnimator; break; case SizeAnimator.Resizing: widthAnimator = Element.GridWidthAnimator; heightAnimator = Element.GridHeightAnimator; break; } sizeAnimators[widthAnimator].To = targetSize.Width; sizeAnimators[heightAnimator].To = targetSize.Height; }