Frage

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?

War es hilfreich?

Lösung

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.

Andere Tipps

The ApplicationBar buttons only support a click event. It is not possible to detect a "long-tap".

As the ApplicationBar support up to 4 buttons you could use separate buttons. Alternatively create buttons on the actual page for this functionality. Then you can have as many as you want. (See Nokia Music, Last.FM or Pandora for examples of other music apps that have put buttons on the page.)

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top