Reputation: 799
I'm trying my best to get the coordinates of where my finger doubletapped when i doubletapped somewhere on the canvas, how can i accomplish this? I have a doubletap method like this:
private void App_DoubleTap(object sender, System.Windows.Input.GestureEventArgs e)
{
//Get coordinates(left and top) of where i doubletapped
}
Please help me and thanks a lot in advance!:)
Upvotes: 0
Views: 587
Reputation: 3345
To get the position relative to the page, use:
Point point=e.GetPosition(this);
To get the position relative to the canvas (with the double Tap event regitered on the Canvas), use:
point = e.GetPosition(sender as UIElement);
Upvotes: 1