'Windows 10 - How do I test touch events without a touchscreen?

I need to test my Windows app using touch events but don't have a touch screen available.



Solution 1:[1]

Microsoft.Windows.Simulator.exe

Located in C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Simulator\16.0\Microsoft.Windows.Simulator.exe

The Simulator has modes that allow for basic touch events using the mouse, as well as pinch-to-zoom, and 2 finger rotation. It simulates your current Windows machine so you can even open up your code in VS, run your app, and set breakpoints that would normally only hit when using touch events.


Edit: based on the comment of Luishg, you need to install both Visual Studio and the Visual Studio UWP package for the Simulator to be installed.

Simulator

Solution 2:[2]

You can actually launch this from visual studio now: https://docs.microsoft.com/en-us/visualstudio/debugger/run-windows-store-apps-in-the-simulator?view=vs-2019

Set the simulator as the target

To run your UWP app in the simulator, select Simulator from the drop-down list next to the Start Debugging button on the debugger Standard toolbar. This option is only available if your app's Target Platform Min. Version is less than or equal to the operating system on your development machine.

Running in the Simulator

PS. mine didnt actually work first time I had to reboot my pc to get it working

Solution 3:[3]

Microsoft.Windows.Simulator.exe is no longer part of Visual Studio 2022.

If you need simulator then install Visual Studio 2019 and UWP feature.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 User1
Solution 3 Lukasz Szczygielek