/// <summary> /// Processes a double animation with keyframes, looking for known /// special values to store with an adapter. /// </summary> /// <param name="da">The double animation using key frames instance.</param> void ProcessDoubleAnimationWithKeys(DoubleAnimationUsingKeyFrames da) { // Look through all keyframes in the instance. foreach (DoubleKeyFrame frame in da.KeyFrames) { DoubleAnimationDimension?d = GeneralAnimationValueAdapter <DoubleKeyFrame> .GetDimensionFromIdentifyingValue(frame.Value); if (d.HasValue) { _specialAnimations.Add(new DoubleAnimationFrameAdapter(d.Value, frame)); } } }
/// <summary> /// Processes a double animation looking for special values. /// </summary> /// <param name="da">The double animation instance.</param> void ProcessDoubleAnimation(DoubleAnimation da) { // Look for a special value in the To property. if (da.To.HasValue) { DoubleAnimationDimension?d = GeneralAnimationValueAdapter <DoubleAnimation> .GetDimensionFromIdentifyingValue(da.To.Value); if (d.HasValue) { _specialAnimations.Add(new DoubleAnimationToAdapter(d.Value, da)); } } // Look for a special value in the From property. if (da.From.HasValue) { DoubleAnimationDimension?d = GeneralAnimationValueAdapter <DoubleAnimation> .GetDimensionFromIdentifyingValue(da.To.Value); if (d.HasValue) { _specialAnimations.Add(new DoubleAnimationFromAdapter(d.Value, da)); } } }