WPF Manipulation Event Forgery

I want to fake manipulation (or touch) of events with the mouse / keyboard. When I try to raise events using:

RoutedEventArgs e = new RoutedEventArgs(ManipulationStartedEvent,this);
RaiseEvent(e);

Gives me the error "Unable to convert RoutedEventArgsto ManipulationStartedEventArgs, and trying to create a new one ManipulationStartedEventArgswill result in an error because there are no constructors for ManipulationStartedEventArgs.

Can this be done?

+3
source share
1 answer

So, the answer is to create a custom touch device by expanding the Touch Device class with the appropriate mouse inputs.

An example of using the Microsoft Multipoint SDK (Multi-Mouse) .

+3
source

Source: https://habr.com/ru/post/1791969/


All Articles