how does MAUI handle cross-platform gesture recognition

Occasional Visitor

specifically how is it implemented for each platform

and where can i find the code for each platform in regards to this gesture recognition

for example, for MacOS i assume there would be some custom NSView implementation with overrides for the following

 

TouchesBeganWithEvent

 

TouchesMovedWithEvent

 

TouchesEndedWithEvent

 

TouchesCancelledWithEvent

 

 

 

and for android i assume there would be similar with custom View implementation and OnTouchEvent method override

 

i do not know for windows nor linux as i have not experimented with those platforms yet

 

 

 

specifically i assume the gesture API MAUI provides is truely cross-platform and has no platform-dependant behavioural differences (with some exceptions for certain gestures

for example

a mouse or stylus CANNOT perform a two-finger scroll gesture however would be implemented via the scroll-wheel if present on the mouse

on a mobile-device a two-finger scroll gesture does not make sense since it is usually just one finger for scrolling

on a trackpad two-finger scrolling makes sense

however regardless of HOW it is implemented, the api would provide a platform-independant way of tracking how much the user has scrolled, possibly accounting for some sensitivity setting the user can modify at will similar to pointer-acceleration settings for large and small monitors and high dpi and low dpi monitors

0 Replies