Before UWP apps and XAML we had Silverlight and WPF. WPF applications were intended to replace the old Winforms applications. With .Net core 3 supporting WPF it has extended it’s lifespan once more. For a customer I had a WPF application that was mainly operated using a touch screen so it had to be touch optimized. It was really hard to test certain touch events because I don’t have laptop with a touch screen. This post will describe a way around this problem by using the windows Simulator.
Below is a screenshot of the Windows simulator. It connects through RDP to your own host . It can be found at: Program Files (x86)\Common Files\microsoft shared\Windows Simulator\14.0 and can be started using “Microsoft.Windows.Simulator.Exe”. This is also the simulator that you can use when developing UWP apps. So how can we use this for WPF?
Working with WPF
First thing you need to do is start the WPF application that you want to debug from your Bin/Debug folder in the Windows Simulator. After that you can use your Visual studio to attach to the process of your WPF application through remote debugging (which isn’t remote at this point anymore ;-)). First thing to do is go to the “Debug” menu item and select “Attach to Process”
In the window that opens select the application you want to connect to and select “Attach to Process”
Touch interact with your application
The icons marked in red can be used to switch between Touch and Mouse events.
@Edit: As posted in the response below. It only works with Pro and not with Home. Thanks for the helpful information CVNK!