Reputation: 823
I'm trying to animate a grid's width using DoubleAnimationUsingKeyFrames. I already know how to make a simple linear animation, but what I'm trying to achieve is a smooth movement that speeds up when it starts than slows down at the end. Right now I'm using LinearDoubleKeyFrame, but I've tried all the other types of DoubleKeyFrames, and none seemed to give me the effect I want. I made a graph that should give you a better idea of what I'm trying to get.
Upvotes: 1
Views: 809
Reputation: 598
An example:
<Trigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation To="100" Duration="0:0:0.2" Storyboard.TargetName="e" Storyboard.TargetProperty="Width">
<DoubleAnimation.EasingFunction>
<EaseInOut ></EaseInOut >
</DoubleAnimation.EasingFunction>
</DoubleAnimation>
</Storyboard>
</BeginStoryboard>
</Trigger.EnterActions>
Upvotes: 1
Reputation: 823
Bradley Uffner:
Use one of the Easing Functions. EaseInOut looks the closest to your graph.
Upvotes: 1