Disabling manipulation inertia in Windows 8
-
11-12-2019 - |
Question
The Windows 8 manipulation events apply inertia by default, as described in this article, i.e. manipulation delta events keep firing after the user has lifted their finger.
Does anyone know how to 'tune' or disable this inertia? I have tried handling ManipulationInertiaStarting
and setting e.Handled=true
, but this does not disable inertia.
Any ideas?
Solution
You can set these up using the ManipulationMode, eg.
dragOverlay.ManipulationMode =
ManipulationModes.TranslateInertia |
ManipulationModes.TranslateX |
ManipulationModes.TranslateY;
vs.
dragOverlay.ManipulationMode =
ManipulationModes.TranslateX |
ManipulationModes.TranslateY;
You can also check e.IsInertial in the manipulation events and call e.Complete() to stop the current manipulation without inertia.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow