Reports for WinForms | ComponentOne
In This Topic
    Setting the Initial Zoom Mode
    In This Topic

    To set the initial zoom mode, set the ZoomMode property to ActualSize, PageWidth, TextWidth, WholePage (default), or Custom. This property can be set at either in the designer or in code.

    In the Smart Designer

    1. Click the Layout button in the PreviewPane floating toolbar to open Layout dialog box.
    2. Select PageWidth from the drop-down menu next to the Zoom Mode:

    In the Properties window

    1. Locate the PreviewPane property for C1PrintPreviewControl in the Properties window and expand the properties node.
    2. Set the ZoomMode property to PageWidth.
          

    In Code

    Add the following code to the Form_Load event to set the ZoomMode to PageWidth:

    To write code in Visual Basic

    Visual Basic
    Copy Code
    Me.C1PrintPreviewControl1.PreviewPane.ZoomMode = C1.Win.C1Preview.ZoomModeEnum.PageWidth
    

    To write code in C#

    C#
    Copy Code
    this.c1PrintPreviewControl1.PreviewPane.ZoomMode = C1.Win.C1Preview.ZoomModeEnum.PageWidth;
    

    What You've Accomplished

    When the document loads, the page zooms into the page width: