e.IsInertial almost always false WPF e.IsInertial almost always false WPF wpf wpf

e.IsInertial almost always false WPF


To make sure that the manipulation flow works as intended you want to handle more of the manipulation events and react accordingly. Here's the overview from MS (Input overview - Touch and manipulations) but in general, you usually want to:

  • handle ManipulationStarting and set the proper manipulation container for your manipulation.
  • handle ManipulationStarted if you want to store some data like the origin of the manipulation for your own calculations.
  • handle Delta while the user has the finger(s) down
  • handle InertiaStarting - here you should set the deceleration values.
  • handle Delta while the user has lifted his fingers (Inertial) - from my experience you'll get these events only if you specify inertial values.
  • handle ManipulationCompleted if you need to know when and where the input process has finished.

From your post I'm not sure whether you know this or not but the InertiaStarting will only happen once the user has lifted his finger(s). And then - if you set the values when handling InertiaStarting properly - you will get a few more ManipulationDeltas incoming (with the Inertial flag).

After that, I don't get any more deltas firing. So what's consuming them; and why am I getting non-inertial ones first?

You have completed the manipulation process by calling complete as the if check below has been fulfilled! So the 'engine' has skipped all the rest of the events it would otherwise fire and completed the manipulation process:

if (e.Cumulative.Translation.X <= -500){    showNext();    e.Complete();}

Once the manipulation has been completed you won't get any more events of course.