Spread Windows Forms 13.0 Product Documentation
Spread Windows Forms 13.0 Product Documentation / Developer's Guide / Using 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%.

    FpSpread uses standard pinch and stretch gestures when zooming.

    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