/// <inheritdoc /> public override Task AnimateAsync(FixedAnimationType animationType, TimeSpan duration) { // Apply all the animations in parallel and wait for their completion return(Task.WhenAll( from pair in PropertiesAnimationValues let target = animationType == FixedAnimationType.In ? pair.Value.On : pair.Value.Off select EffectBrush.StartAnimationAsync(pair.Key, target, duration))); }
/// <inheritdoc /> public override Task AnimateAsync(FixedAnimationType animationType, TimeSpan duration) { return(EffectBrush.StartAnimationAsync(Parameters.Property, animationType == FixedAnimationType.In ? Parameters.On : Parameters.Off, duration)); }
/// <summary> /// Executes the animation to the desired destination status and returns a task that completes when the animation ends /// </summary> /// <param name="animationType">The target animation status</param> /// <param name="duration">The animation duration</param> public abstract Task AnimateAsync(FixedAnimationType animationType, TimeSpan duration);