سؤال

In Windows phone 8.1, I want to show context menu (popup) for an item in listview (say for deleting it) upon tap-and-hold or long press. Is there a way to do this in javascript (winjs)?

I found no examples of this anywhere. Any help would be appreciated.

هل كانت مفيدة؟

المحلول

I believe you need to take a look at the MSGestureHold event. You just need to add an event handler for that event.

Take a look at the MSGestureEvent object for more events you might need

نصائح أخرى

In my test, the MSGestureHold is not fired in Windows Phone 8.1 for some reason. It's possible that this is a bug. MSGestureHold is ignored by WebBrowser Control for Windows Phone 8.1

One possible workaround is to switch to XAML framework and use the WebView control but in my case it's not possible as I depend heavily on Silverlight controls.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top