Paint on an InkCanvas with finger (touch screen) not mouse - mouseMove instead of MouseClick

StackOverflow https://stackoverflow.com/questions/9036718

  •  20-04-2021
  •  | 
  •  

문제

I am using an InkCanvas on a Wpf Window (c#). This Canvas is working when I am draging the mouse to the canvas, and then CLICK the mouse to draw what ever I want.

I intend to put this on a touch screen. As I unsderstand, the touch on the screen (finger or pen) will act as Mouse-Move, and not Mouse-Click, therefore nothing will be painted.

How can I achieve this?

도움이 되었습니까?

해결책

That assumption is wrong, all touch behaviors are interpreted as mouse interaction by default if you do not override it, a touch turns into MouseDown, so it will work (i have a touch-screen myself).

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top