Skip to main content

RichEditControl.ShowPrintPreview() Method

Invokes the Print Preview window.

Namespace: DevExpress.XtraRichEdit

Assembly: DevExpress.XtraRichEdit.v22.2.dll

NuGet Package: DevExpress.Win.RichEdit

Declaration

public void ShowPrintPreview()

Remarks

The Print Preview form utilizes the Ribbon user interface by default. To select the Bars user interface, use the PrintingOptions.PrintPreviewFormKind property.

Note

This method invokes the Document Viewer, so you have to deploy additional assemblies required for this dialog. See the Redistribution and Deployment topic for more information.

Example

The following code checks the RichEditControl.IsPrintingAvailable property value and invokes the print preview window. The current RichEditControl instance is passed to the BarItem.ItemClick event handler using the BarItem.Tag property.

View Example

static void buttonCustomAction_ItemClick_ShowPrintPreviewMethod(object sender, ItemClickEventArgs e) {
    RichEditControl richEdit = e.Item.Tag as RichEditControl;
    if(richEdit.IsPrintingAvailable) {
        richEdit.ShowPrintPreview();
    }
}
See Also