[Windows Phone] Tilt effect in MultiselectList

Good morning followers,

Today I’m going to show you how to implement tilt effect in MultiselectList, and other kinds of lists. I remembered it when I was reading Javier Suarez Ruiz’s post that talks about how to implement tilt effect step by step.

In my case, I need to implement tilt effect in other kind of item list like MultiselectList. Solving this problem is easy.

If you take a look at the implementation of Tilt that we have in PhoneToolkit. We’ll see this constructor…

static TiltEffect()
{
// The tiltable items list.
TiltableItems = new List<Type>()
{
typeof(ButtonBase),
typeof(ListBoxItem),
typeof(MenuItem),
};
}

and TiltableItems is a public List<Type> like this…

public static List<Type> TiltableItems { get; private set; }

So, we are able to add other kinds of items to this list.

We can implement the solution for all our project/solution. In the constructor of App.xaml.cs for example. Once MultiselectItem will be included in TiltableItems, it will be enabled for all the MultiselectList.

Obviously we only have to add the MultiselectItem to the TiltableItems.

// Enable tilt effect for multiselect items
TiltEffect.TiltableItems.Add(typeof(MultiselectItem));

We must to enable Tilt effect in our xaml too.

toolkit:TiltEffect.IsTiltEnabled="True"

A greeting to whom read me.

Melerin

Imagen1734

You don’t have ‘my tasks’ for Windows Phone 7 yet? You can download it from this link. I hope you enjoy and find it useful.

Un comentario en “[Windows Phone] Tilt effect in MultiselectList

  1. Great post!. Thank you very much for the mention.

Deja un comentario