ElasticEase & BounceEase properties

Sep 27, 2011 at 8:01 AM

Is it possible to set properties for the elasticEase or BounceEase AnimationTransition?

I mean, in the Animation.ElasticEase function you can set the Oscillations and Springiness properties. I can't find a way to do that with the PercentHandler easing functions.

Sep 27, 2011 at 8:28 AM

Just create your own like so:

public static System.Windows.Media.Animation.BounceEase myBounce = new System.Windows.Media.Animation.BounceEase() { 
    Bounces = 3, Bounciness = 2 

public static PercentHandler myBounceEase = (percent) => { 
    return myBounce.Ease(percent); 

ball.SlideTo(x, y, time, myBounceEase, delay);

Sep 27, 2011 at 8:34 AM

Thanks for the quick reply.

I saw the custom ease function chapter, but I didn't know how to use it, so thanks for the example.

B.t.w. great library!

Sep 27, 2011 at 9:19 AM

You’re welcome and thank-you.

You’re right though, that page is a bit confusing and doesn’t really say much even if you know what’s going on already.

I just added this example to the documentation so hopefully it’ll help others in the future.