Spread Windows Forms 15.0
Spread Windows Forms 15.0 Product Documentation / Developer's Guide / Touch Support with the Component / Using Touch Support / Using Touch Support with Zooming
In This Topic
    Using Touch Support with Zooming
    In This Topic

    You can use the pinch operation when zooming.

    Set the AllowUserToTouchZoom property to allow zooming using the pinch operation.

    You can use the TouchZoomSnapPoints property to configure snap points. When zooming, if the final zoom factor is close to (less than the TouchZoomSnapDistance property value) a snap point, the final zoom factor changes to the snap point. For example, add 1 to the snap point. When the user changes the zoom factor to 103%, the zoom factor changes to 100%.

    Touch Support when Zooming

    FpSpread uses standard pinch and stretch gestures when zooming. For more information, see https://docs.microsoft.com/en-us/.

    Using Code

    The following example allows zooming with the pinch operation.

    CS
    Copy Code
    fpSpread1.AllowUserToTouchZoom = true;
    fpSpread1.MinZoomFactor = .1F;
    fpSpread1.TouchZoomSnapDistance = 1;
    fpSpread1.TouchZoomSnapPoints.Add(1f);
    fpSpread1.TouchZoomSnapPoints.Add(2f);
    
    VB
    Copy Code
    fpSpread1.AllowUserToTouchZoom = True
    fpSpread1.MinZoomFactor = .1F
    fpSpread1.TouchZoomSnapDistance = 1
    fpSpread1.TouchZoomSnapPoints.Add(1f)
    fpSpread1.TouchZoomSnapPoints.Add(2f)
    
    See Also