tapandhold

How to implement Hold in Listbox?

放肆的年华 提交于 2019-12-03 21:10:27
问题 If hold the listbox, I want to get listbox index. This is my code: <ListBox Margin="0,0,-12,0" Hold="holdlistbox" x:Name="listbox" SelectionChanged="listbox_SelectionChanged" SelectedIndex="-1"> </ListBox> private void holdlistbox(object sender, System.Windows.Input.GestureEventArgs e) { //How to get ListBox index here } If anyone knows help me to do this. 回答1: e.OriginalSource will get you the actual control that was held (the top-most control directly under your finger). Depending on your

How to implement Hold in Listbox?

懵懂的女人 提交于 2019-11-30 22:05:45
If hold the listbox, I want to get listbox index. This is my code: <ListBox Margin="0,0,-12,0" Hold="holdlistbox" x:Name="listbox" SelectionChanged="listbox_SelectionChanged" SelectedIndex="-1"> </ListBox> private void holdlistbox(object sender, System.Windows.Input.GestureEventArgs e) { //How to get ListBox index here } If anyone knows help me to do this. e.OriginalSource will get you the actual control that was held (the top-most control directly under your finger). Depending on your ItemTemplate and where you hold then this could be any of the controls in the item. You can then check the

Determining Long Tap (Long Press, Tap Hold) on Android with jQuery

拟墨画扇 提交于 2019-11-30 13:52:41
I've been able to successfully play with the touchstart, touchmove, and touchend events on Android using jQuery and an HTML page. Now I'm trying to see what the trick is to determine a long tap event, where one taps and holds for 3 seconds. I can't seem to figure this out yet. I'm wanting to this purely in jQuery without Sencha Touch, JQTouch, jQMobile, etc. I like the concept of jQTouch, although it doesn't provide me a whole lot and some of my code breaks with it. With Sencha Touch, I'm not a fan of moving away from jQuery into Ext.js and some new way of doing Javascript abstraction,

Determining Long Tap (Long Press, Tap Hold) on Android with jQuery

二次信任 提交于 2019-11-29 19:31:27
问题 I've been able to successfully play with the touchstart, touchmove, and touchend events on Android using jQuery and an HTML page. Now I'm trying to see what the trick is to determine a long tap event, where one taps and holds for 3 seconds. I can't seem to figure this out yet. I'm wanting to this purely in jQuery without Sencha Touch, JQTouch, jQMobile, etc. I like the concept of jQTouch, although it doesn't provide me a whole lot and some of my code breaks with it. With Sencha Touch, I'm not