-1

here is the code the debugger enters the handlinput region but never clears the touchpanel.isgestureavailable, even when we tap the screen thanks for ur helpin advance :)

 #region Handle Input
        public override void HandleInput(InputState input)
        {

            Debug.WriteLine("hey stackoverflow\n");

            if (TouchPanel.IsGestureAvailable)
            {
                Debug.WriteLine("check presence\n");

                // read the next gesture
                var gesture = TouchPanel.ReadGesture();
                if (gesture.GestureType == GestureType.Tap | gesture.GestureType == GestureType.Flick | gesture.GestureType == GestureType.Hold)
                {
                // code sample
                }
            }

            base.HandleInput(input);
        }
        #endregion

plz help been doing this for two days now !!!!!

pinckerman
  • 4,115
  • 6
  • 33
  • 42
Corleone
  • 361
  • 1
  • 3
  • 6
  • This has been answered in this thread: http://stackoverflow.com/questions/4837747/cant-seem-to-get-touch-input-from-touchpanel-in-windows-phone-7 – Samir Majhi Jun 19 '13 at 04:49

1 Answers1

2

I think you forgot to initialize the gesture you want to handle.

TouchPanel.EnabledGestures = gestureType;

pinckerman
  • 4,115
  • 6
  • 33
  • 42
  • I've enabled the gestures using TouchPanel.EnabledGestures Property. TouchPanel.EnabledGestures = GestureType.Hold | GestureType.Tap |GestureType.Flick; TouchPanel.IsGestureAvailable is still always false. – Corleone Jun 19 '13 at 14:14
  • According to the MSDN library, the only way to set it `true` is set `TouchPanel.EnabledGestures`: "_Before gestures can become available, they first must be set with the TouchPanel.EnabledGestures property. If IsGestureAvailable is true, TouchPanel.ReadGesture can be used to read the gesture data._" In which method are you initializing it? – pinckerman Jun 19 '13 at 20:01