TouchToolKit for WinForms | ComponentOne
Zooming Component / C1Zoom Layout / Setting Zoom Factor in Code
In This Topic
    Setting Zoom Factor in Code
    In This Topic

    You can get or set the form’s ZoomFactor by using the C1Zoom.ZoomFactor property. The following code sets the ZoomFactor to 200% when the button is clicked.

     

    [C#]

    private void button1_Click(object sender, EventArgs e)

    {

        c1Zoom1.ZoomFactor = 2.0f;

    }

     

    [Visual Basic]

    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click

        C1Zoom1.ZoomFactor = 2.0F

    End Sub

     

    The following image illustrates the ZoomFactor set to 200% when the button is clicked.

     

    Set the zoom factor to 200%

     

    The following image illustrates the ZoomFactor set to 100% when the button is clicked.

     

    Set the zoom factor to 100%