PinchGestureChanged
PinchGestureChanged is the conduit for monitoring and handling the changes during a pinch gesture, which is a standard multi-touch gesture often used for zooming and scaling operations. It acts like a running commentary, updating the data related to a pinch gesture like position, direction, distance, and scale as the gesture progresses.
The class offers various properties that get updated in real time as and when a pinch gesture continues after initiation. Understanding these changes is key in producing smooth and natural reactions to pinch gestures in your application.
Just like Class.PinchGestureBegan , you will mainly encounter this class as the parameter for events from the Service.Input .
Properties
The 'DeltaPosition' property provides the change in position of the pinch from the last frame to the current one. This helps track the motion vector of the pinch in real time.
The 'StartPosition' property keeps the coordinates of the initial pinch position as a reference. It helps calculate the relative movement from the very start of the pinch gesture.
The 'Position' property indicates the current position of the pinch gesture. As the fingers move during the pinch, this property gets updated with the latest position.
The 'Direction' attribute offers a directional vector that charts the directional movement of the pinch. It helps direct actions based on the pinch gesture, like zooming towards a specific direction.
The 'Distance' property measures the gap between the two fingers involved in the pinch. This property is crucial in scaling operations where the amount of zoom is directly proportional to the pinch's distance covered.
The 'Scale' property calculates the scaling factor based on the covered 'Distance' of the pinch. It's essentially the amount of magnification or reduction applied when the pinch gesture is used to zoom in or out.
The 'IsPinching' property is a boolean flag that denotes if the pinch gesture is currently occurring. It can be used to initiate or cease operations as long as the pinch gesture is active.
Updated 5 months ago