简体   繁体   中英

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.

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;
    }

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM