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:

msTouchAction Value Support Notes
styleMsTouchActionNotSet -1 N/A
styleMsTouchActionNone 0 Supported
styleMsTouchActionAuto 1 N/A
styleMsTouchActionManipulation 2 Supported
styleMsTouchActionDoubleTapZoom 4 N/A
styleMsTouchActionPanX 8 N/A
styleMsTouchActionPanY 16 N/A
styleMsTouchActionPinchZoom 32 N/A
styleMsTouchActionCrossSlideX 64 N/A
styleMsTouchActionCrossSlideY 128 N/A
styleMsTouchAction_Max 2147483647L N/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