Allowing Zooming

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

This example allows zooming and sets the zoom factor.

CS
Copy Code
private void Grid_Loaded_1(object sender, RoutedEventArgs e)
        {
            gcSpreadSheet1.CanUserZoom = true;
        }
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            gcSpreadSheet1.Sheets[0].ZoomFactor = 2;
        }
VB
Copy Code
Private Sub MainPage_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded       
      GcSpreadSheet1.CanUserZoom = True     
    End Sub
    Private Sub Button_Click_1(sender As Object, e As RoutedEventArgs)       
   GcSpreadSheet1.Sheets(0).ZoomFactor = 2
    End Sub
See Also

 

 


Copyright © GrapeCity, inc. All rights reserved.