Can someone explain the meaning of manipulation modes such as TranslateX
, TranslateRailsX
, TranslateInertia
?
What is a rail mode
? And what inertia they are talking about?
With rails - when the input processor detects whether the manipulation is mostly vertical or mostly horizontal it sticks to the respective axis when reporting translation delta/cumulative values. If not - it just allows to freely manipulate whatever you are manipulating. Rails flags have to be used in combination with the non-rails flags, so just TranslateRailsX
doesn't work. You need both that and TranslateX
to get anything going.
The TranslateInertia
flag allows for simple handling for flicks or inertial rotations/scales in case of the other inertia flags. Basically if you add that flag to the TranslateX
one for example and you do a quick flick gesture - you will keep getting the input events (ManipulationDelta
) for a while even after the gesture is completed. You also get the ManipulationInertiaStarting
event when you flick once the input stream ends, so you get to control how far the flick goes if you want to. You can check out my extensions to the argument of that event in WinRT XAML Toolkit to get some more control over the ballistics of the flick too.
Your ManipulationDeltaEventArgs
have an IsIntertial
property you can also use to check if the events you are getting are directly from input events or a result of a flick and also call Complete()
if for some reason you don't want to continue getting the delta events for the flick.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With