IInertiaProcessor::put_InitialOriginX method (manipulations.h)

The InitialOriginX property specifies the starting horizontal location for a target with inertia.

This property is read/write.

Syntax

HRESULT put_InitialOriginX(
  FLOAT x
);

Parameters

x

Return value

None

Remarks

A user can manipulate an object to set the InitialOriginX to be outside of the elastic bounds. Setting InitialOriginX to a value outside of the elastic bounds will cause an exception to be thrown. To prevent users from setting the origin out of bounds, check that InitialOriginX is valid before setting it on an IInertiaProcessor interface. If Inertia processing has already started, calling put_InitialOriginX() will reset the inertia state to initial time stamp.

All locations used for the inertia and manipulation processor are relative. If you want to use screen coordinates, you pass screen coordinates to the manipulation (or inertia) processor; if you want to use absolute coordinates, you pass those into the processor you are using.

Call this function to set the initial state of inertia. You would call this function most likely during the ManipulationCompleted event of the IManipulationProcessor or in the constructor of the IInertiaProcessor interface.

Requirements

Requirement Value
Minimum supported client Windows 7 [desktop apps only]
Minimum supported server Windows Server 2008 R2 [desktop apps only]
Target Platform Windows
Header manipulations.h (include Manipulations.h)

See also

Handling Inertia in Unmanaged Code

IInertiaProcessor

Inertia Mechanics

InitialOriginY

Properties