Search code examples
c#xamlwindows-phone-8wptoolkit

How can I use my own application bar with tilt effec?


For my Windows Phone 8 application, I'm implementing my own application bar (I can't use the application bar provided by the system). Everything is working fine, but I have one big problem: the tilt effect for menu items!

I've tried to used the tilt effect provided by the WP toolkit, but it doesn't look like the original one. So how can I use the exact tilt effect by the system application bar in my own application bar ?

Thanks.


Solution

  • because your own app bar is not Tiltable Item. you can get the TiltEffect.cs file from this link:

    http://code.msdn.microsoft.com/wpapps/Tilt-Effect-Sample-fab3b035

    and then you should add your own app bar to the TiltableItems in TiltEffect's Constructor, some like this:

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