How to change animation speed around the world in a WPF application?

I would like to add the ability to globally change the speed of all animations in my WPF application. For example, some users may not like animation, so they can reduce the duration to a quarter of the norm. During the demonstration, you may need to double the duration so that they are underlined.

I figured out how to set the DesiredFrameRate property globally, but I can't figure out how to set the SpeedRatio property globally (that is, so that SpeedRatio applies to all timelines, and not just to one specific timeline at a time). Animations themselves can appear from different places (triggers, visual state manager, etc.).

Any thoughts?

+3
source share
1

:

<KeyTime x:Key="AnimationTime">0</KeyTime>
<Storyboard x:Key="Storyboard1">
    <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(TextBoxBase.Background).(SolidColorBrush.Color)" Storyboard.TargetName="{x:Null}">
        <EasingColorKeyFrame KeyTime="{StaticResource AnimationTime}" Value="Red"/>
    </ColorAnimationUsingKeyFrames>
</Storyboard>
0

All Articles