TouchToolKit for WinForms | ComponentOne
Application Zoom Component / Setting Max Zoom Factor
In This Topic
    Setting Max Zoom Factor
    In This Topic

    Setting the Maximum ZoomFactor of a Specific Form

    The following code sets the maximum ZoomFactor of a specific Form.

     

    [C#]

    private void c1Application_Attaching(object sender, C1ZoomAttachedEventArgs e)

    {

        if(e.Form is Form2)

        {

             e.C1Zoom.MaxZoomFactor = 3.0f;

        }

    }

     

    [Visual Basic]

    Imports C1.Win.TouchToolKit

     

    Private Sub C1ApplicationZoom1_C1ZoomAttaching(sender As Object, e As C1ZoomAttachingEventArgs) Handles C1ApplicationZoom1.C1ZoomAttaching

        If TypeOf e.Form Is Form2 Then

            e.C1Zoom.MaxZoomFactor = 3.0F

        End If

    End Sub