Ben
Ben

Reputation: 31

How to get Metro in Motion Tilt Effect to work on buttons?

I have tried using Metro in Motion Tilt Effect on buttons and hubtiles within my WP7 app and cannot get it to work. It works on rectangles and listbox items but not on buttons and hubtiles. I think it is something to do with applying the effect to a frameworkelement but I am unsure. Does anyone know what I need to change in the Metro in Motion source to get it to work on Buttons and Hubtiles?

The Metro in Motion source is here http://www.scottlogic.co.uk/blog/colin/wp-content/uploads/2011/05/MetroInMotion4.zip

I tried adding a button directly into the above example and it does not work either.

Upvotes: 3

Views: 416

Answers (1)

alfah
alfah

Reputation: 2085

Add the toolkit reference to your project. Then add the following lines in the PhoneApplicationPage tag

xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit" 
toolkit:TiltEffect.IsTiltEnabled="True"

Now all clickable elements will have the tilt effect.

Upvotes: 2

Related Questions