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.
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!
Sadly this only works if you have Windows Pro since Home edition doesn’t allow incoming RDP connections.
I didnt know this. It was a very good suggestion. i’ll add it to the article. Thank you!
Hi, do you have to install any particular SDK or package for it to be available? I don’t have the Windows Simulator folder here.
You only have to install the UWP features with visual studio. According to this link the version number increases/decreases according to visual studio version.