windows-phone-8application-bar

Windows Phone 8 ApplicationBar button long-tap event


I'm trying to create a music player in my Windows Phone 8 application. I want to use same ApplicationBar buttons for Next and Forward as well as Previous and Backward functions. Is there any chance to get long-tap event of an ApplicationBar button(?) so that I can differentiate Next/Forward functions.

Can anyone help me with this?


Solution

  • This is not possible. The ApplicationBar API is quite restrictive, which is a deliberate move by Microsoft to ensure consistency. You cannot handle arbitrary events from the ApplicationBar. If you want this kind of behaviour, you will have to build your own UI to support it.

    It is worth noting that your users will not expect 'long press' (more commonly referred to as tap-and-hold) behaviour on the app-bar.