I think you can try using Xna 's TouchPanel - it works very well, and I think you will do what you want:
using Microsoft.Xna.Framework.Input.Touch;
using Microsoft.Xna.Framework;
public MainPage()
{
InitializeComponent();
TouchPanel.EnabledGestures = GestureType.Tap;
this.Tap += MainPage_Tap;
}
private void MainPage_Tap(object sender, System.Windows.Input.GestureEventArgs e)
{
GestureSample gesture = TouchPanel.ReadGesture();
Vector2 vector = gesture.Position;
int positionX = (int)vector.X;
int positionY = (int)vector.Y;
}
(0,0), , , .
EDIT -
, TouchInput CompositionTarget.Rendering Timer - , .
, XNA , , :
FrameworkDispatcher.Update();
EDIT 2 - Pinch
Pinch , :
public MainPage()
{
InitializeComponent();
TouchPanel.EnabledGestures = GestureType.Pinch;
this.ManipulationCompleted+=MainPage_ManipulationCompleted;
}
private void MainPage_ManipulationCompleted(object sender, System.Windows.Input.ManipulationCompletedEventArgs e)
{
if (TouchPanel.IsGestureAvailable)
{
GestureSample gesture = TouchPanel.ReadGesture();
Vector2 vector = gesture.Position;
int positionX = (int)vector.X;
int positionY = (int)vector.Y;
}
}
FrameworkDispatcher.Update() - , OnNavigetedTo().