Note that there are some explanatory texts on larger screens.

plurals
  1. PODetect Simple Touch Gestures
    primarykey
    data
    text
    <p>Can anyone explain on how to detect simple touch gestures in a WinRT app? I tried using the <code>GestureRecognizer</code> class but it didn't work:</p> <pre><code> public MainPage() { this.InitializeComponent(); Windows.UI.Input.GestureRecognizer gr = new Windows.UI.Input.GestureRecognizer(); gr.CrossSliding += gr_CrossSliding; gr.Dragging += gr_Dragging; gr.Holding += gr_Holding; gr.ManipulationCompleted += gr_ManipulationCompleted; gr.ManipulationInertiaStarting += gr_ManipulationInertiaStarting; gr.ManipulationStarted += gr_ManipulationStarted; gr.ManipulationUpdated += gr_ManipulationUpdated; gr.RightTapped += gr_RightTapped; gr.Tapped += gr_Tapped; gr.GestureSettings = Windows.UI.Input.GestureSettings.ManipulationRotate | Windows.UI.Input.GestureSettings.ManipulationTranslateX | Windows.UI.Input.GestureSettings.ManipulationTranslateY | Windows.UI.Input.GestureSettings.ManipulationScale | Windows.UI.Input.GestureSettings.ManipulationRotateInertia | Windows.UI.Input.GestureSettings.ManipulationScaleInertia | Windows.UI.Input.GestureSettings.ManipulationTranslateInertia | Windows.UI.Input.GestureSettings.Tap; } void gr_Tapped(Windows.UI.Input.GestureRecognizer sender, Windows.UI.Input.TappedEventArgs args) { Debug.WriteLine("gr_Tapped"); } void gr_RightTapped(Windows.UI.Input.GestureRecognizer sender, Windows.UI.Input.RightTappedEventArgs args) { Debug.WriteLine("gr_RightTapped"); } void gr_Holding(Windows.UI.Input.GestureRecognizer sender, Windows.UI.Input.HoldingEventArgs args) { Debug.WriteLine("gr_Holding"); } void gr_Dragging(Windows.UI.Input.GestureRecognizer sender, Windows.UI.Input.DraggingEventArgs args) { Debug.WriteLine("gr_Dragging"); } void gr_CrossSliding(Windows.UI.Input.GestureRecognizer sender, Windows.UI.Input.CrossSlidingEventArgs args) { Debug.WriteLine("gr_CrossSliding"); } void gr_ManipulationUpdated(Windows.UI.Input.GestureRecognizer sender, Windows.UI.Input.ManipulationUpdatedEventArgs args) { Debug.WriteLine("gr_ManipulationUpdated"); } void gr_ManipulationStarted(Windows.UI.Input.GestureRecognizer sender, Windows.UI.Input.ManipulationStartedEventArgs args) { Debug.WriteLine("gr_ManipulationStarted"); } void gr_ManipulationCompleted(Windows.UI.Input.GestureRecognizer sender, Windows.UI.Input.ManipulationCompletedEventArgs args) { Debug.WriteLine("gr_ManipulationCompleted"); } void gr_ManipulationInertiaStarting(Windows.UI.Input.GestureRecognizer sender, Windows.UI.Input.ManipulationInertiaStartingEventArgs args) { Debug.WriteLine("gr_ManipulationInertiaStarting"); } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload