public Play ( |
||
associatedElement | The element to use to control the animation. | |
return | void |
/// <summary> /// Indicates that the effect should start playing. /// </summary> /// <param name="direction">Indicates whether to play the direction in forward direction or reverse direction.</param> public void PlayEffect(EffectDirection direction) { if (_animation != null) { _animation.Stopped -= OnAnimationStopped; if (_animation.IsPlaying) { _animation.Stop(ProceduralAnimationStopState.Complete); } _animation = null; } if ((direction == EffectDirection.Reverse) && (AutoReverse || (Reversible == false))) { direction = EffectDirection.Forward; } if (_reversed) { direction = (direction == EffectDirection.Forward) ? EffectDirection.Reverse : EffectDirection.Forward; } _animation = CreateEffectAnimation(direction); if (_animation != null) { _direction = direction; _animation.Stopped += OnAnimationStopped; OnStarting(); _animation.Play(AssociatedObject); } }
/// <summary> /// Indicates that the effect should start playing. /// </summary> /// <param name="direction">Indicates whether to play the direction in forward direction or reverse direction.</param> public void PlayEffect(AnimationEffectDirection direction) { if (_animation != null) { _animation.Stopped -= OnAnimationStopped; if (_animation.IsPlaying) { _animation.Stop(ProceduralAnimationStopState.Complete); } _animation = null; } if ((direction == AnimationEffectDirection.Reverse) && (AutoReverse || (Reversible == false))) { direction = AnimationEffectDirection.Forward; } if (_reversed) { direction = (direction == AnimationEffectDirection.Forward) ? AnimationEffectDirection.Reverse : AnimationEffectDirection.Forward; } _animation = CreateEffectAnimation(direction); if (_animation != null) { _direction = direction; _animation.Stopped += OnAnimationStopped; OnStarting(); _animation.Play(AssociatedObject); } }
/// <summary> /// Plays the current layout animation when an arrange pass is completed. /// </summary> protected void EndArrange() { if ((_animations != null) && (_animations.Count != 0)) { _layoutAnimation = new ProceduralAnimationSet(_animations.ToArray()); _layoutAnimation.Play(this); } _animations = null; }