private void myElement_PointerPressed(object sender, PointerRoutedEventArgs e) { // do something with the pointer event, such as display coordinates Point p = e.GetCurrentPoint(myElement).Position; Debug.WriteLine("Pressed at ({0}, {1})", p.X, p.Y); }
private void myElement_PointerMoved(object sender, PointerRoutedEventArgs e) { // check if the left button is held down if (e.GetCurrentPoint(myElement).Properties.IsLeftButtonPressed) { // do something when left button is pressed and device is moved } }The package library for PointerRoutedEventArgs is Windows.UI.Xaml, which is included in the Windows Runtime API.