FlexGrid for WinForms | ComponentOne
C1.Win.C1FlexGrid Namespace / GridPrinter Class / PrintPreviewDialog Property
Example

In This Topic
    PrintPreviewDialog Property (GridPrinter)
    In This Topic
    Gets a reference to the PrintPreviewDialog used to display the grid's print preview.
    Syntax
    'Declaration
     
    
    Public ReadOnly Property PrintPreviewDialog As PrintPreviewDialog
    public PrintPreviewDialog PrintPreviewDialog {get;}
    Remarks
    Use this property to customize the size and position of the preview dialog when printing the grid with the PrintGridFlags.ShowPrintDialog option.
    Example
    The code below uses the PrintPreviewDialog property to display the preview dialog with a custom caption and in a maximized state:
    Form dlg = _flex.PrintParameters.PrintPreviewDialog as Form;
    dlg.Text = "Custom Caption";
    dlg.StartPosition = FormStartPosition.Manual;
    dlg.WindowState = FormWindowState.Maximized;
    _flex.PrintGrid("test", PrintGridFlags.ShowPreviewDialog);
    See Also