Skip to main content
A newer version of this page is available. .

PrintTool.PreviewForm Property

Provides access to a Print Preview form of the PrintTool.

Namespace: DevExpress.XtraPrinting

Assembly: DevExpress.XtraPrinting.v19.2.dll

Declaration

public PrintPreviewFormEx PreviewForm { get; }

Property Value

Type Description
PrintPreviewFormEx

A PrintPreviewFormEx object.

Example

This example illustrates how to define a document scale factor in a print preview.

using System;
using System.Windows.Forms;
using DevExpress.XtraPrinting;
using DevExpress.XtraReports.UI;
using DevExpress.XtraPrinting.Preview;
// ...

private void button1_Click(object sender, EventArgs e) {
    ReportPrintTool printTool = new ReportPrintTool(new XtraReport1());
    printTool.Report.CreateDocument(false);
    printTool.PreviewForm.Load += new EventHandler(PreviewForm_Load);
    printTool.ShowPreviewDialog();
}

void PreviewForm_Load(object sender, EventArgs e) {
    PrintPreviewFormEx frm = (PrintPreviewFormEx)sender;
    frm.PrintingSystem.ExecCommand(PrintingSystemCommand.Scale, new object[] { 0.7f });
}
See Also