Spread WPF 15
Spread WPF Documentation / Developer's Guide / Managing the User Interface / Allowing Zooming
In This Topic
    Allowing Zooming
    In This Topic

    You can zoom in or out of the control. Use Ctrl + mouse wheel to zoom.

    The cell size and contents will change as well as the viewport and drop-down button.

    Borders, grid lines, freeze lines, split bars, and the selection indicator are not affected.

    You can set a zoom factor to a value between .1 and 4. Set the ZoomFactor property in the PrintInfo class for printing.

    You can specify whether the user can zoom with the CanUserZoom property in code.

    Using Code

    The following example allows the user to zoom.

    Copy Code
    gcSpreadSheet1.CanUserZoom = true;
     private void button1_Click(object sender, RoutedEventArgs e)
         gcSpreadSheet1.Sheets[0].ZoomFactor = 2;
    Copy Code
    GcSpreadSheet1.CanUserZoom = True
    Private Sub Button1_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles Button1.Click
         GcSpreadSheet1.Sheets(0).ZoomFactor = 2
    End Sub