Touch screen interaction - PointerMoved after PointerPressed

Jim Young 1 Reputation point

In my app when a simple tap on the screen occurs with touch, I'm getting a PointerMoved event after the PointerPressed event. This does not happen when the same sort of interaction occurs with the mouse, left clicking on the screen.

The PointerMoved event is really unwanted and I'm looking for a way to filter this event out when there is just a simple tap on the screen.

There are other cases when I do need to process PointerMoved, so it not like I want to ignore every instance of this event.

I'm seeing this behavior over several devices and it has also been reported by testers of my app.

Universal Windows Platform (UWP)
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Richard Zhang-MSFT 6,936 Reputation points


    Welcome to our Microsoft Q&A platform!

    In touch screen interactions, you can try to use the Tapped event, which represents a finger tapping the screen.

    In the PointerPressed event, you can filter out finger triggers this way:

    private void Something_PointerPressed(object sender, PointerRoutedEventArgs e)
        if (e.Pointer.PointerDeviceType == PointerDeviceType.Mouse)
            // Do mouse things...