ITridentTouchInputSite::SetManipulationMode method

Sets the control's manipulation mode to a specified msTouchAction style.

Syntax


HRESULT SetManipulationMode(
  [in] styleMsTouchAction  msTouchAction
);

Parameters

msTouchAction [in]

Return value

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

A control can use SetManipulationMode to toggle whether it receives all touch input, or if independent manipulations are allowed to take some input away from the control and provide browser default panning and zooming behaviors.

Currently only the styleMsTouchActionNone and styleMsTouchActionManipulation values of the msTouchAction enumeration are supported:

msTouchActionValueSupport Notes
styleMsTouchActionNotSet -1N/A
styleMsTouchActionNone 0Supported
styleMsTouchActionAuto1N/A
styleMsTouchActionManipulation2Supported
styleMsTouchActionDoubleTapZoom4N/A
styleMsTouchActionPanX 8N/A
styleMsTouchActionPanY 16N/A
styleMsTouchActionPinchZoom32N/A
styleMsTouchActionCrossSlideX64N/A
styleMsTouchActionCrossSlideY128N/A
styleMsTouchAction_Max2147483647LN/A

 

A control should first support ITridentTouchInput to use this API. When ITridentTouchInput is implemented, the default manipulation mode is styleMsTouchActionManipulation. This allows the browser to process input for panning and zooming. Once the control instantiates later, a call can be made to set the manipulation mode to styleMsTouchActionNone to receive all input directly and disable manipulations. For compatibility, controls that don’t implement ITridentTouchInput will get a default value of styleMsTouchActionNone. This will provide the legacy behavior of the control getting all input directly with no browser behaviors acting on the input messages.

The effects of this API are not immediate and must be propagated from the control, through a layout, to the rendering representation. For this reason, it is recommended that controls determine at initialization whether they support manipulations or want all input and then call this method only once for the lifetime of the control.

See also

ITridentTouchInputSite
touch-action property

 

 

Show: