tags:

views:

27

answers:

2

Hi,

I'd like to create view that if the user clicks on a control, let's say a TextBlock, that the control would spring back and forth in place from where the user clicked.

By spring I mean push back and forth like if there were springs behind the TextBlock in each corner.

I've seen demos of this type of effect, and for the life of me, I can't come up with the name of the effect to help with searches, or find an example of this.

Maybe instead of a TextBlock it would help to image a picture that could be pressed down on, and as if springs were behind it and then would bounce back into place.

A: 

I think you want to change the scale transformation matrix of the text using an animation that has both an ease in and ease out element - most probably a BounceEase or ElasticEase, but you'll need to experiment to see which works best for you.

You'll need to trigger it when you click on the control.

Take a look at this example for some pointers.

ChrisF
+1  A: 

I think you are referring to the Gratuitous Graphics Demo that was on display at MIX09. Here is a link to the source code:

http://blogs.msdn.com/henryh/archive/2009/03/20/mix09-the-gratuitous-graphics-demo.aspx

Page Brooks