這裏是代碼 調試器進入handlinput區域,但不會清除touchpanel.isgestureavailable,甚至當我們點擊屏幕 感謝烏爾助人爲樂提前:)TouchPanel.IsGestureAvailable()始終是假
#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幫助已經這麼做了兩天了!!!!!
這已經回答了這個線程: http://stackoverflow.com/questions/4837747/cant-seem-to-get-touch-input-from-touchpanel-in- windows-phone-7 –