RichEditControl.ShowPrintPreview() Method

Invokes the Print Preview window.

Namespace: DevExpress.XtraRichEdit

Assembly: DevExpress.XtraRichEdit.v20.1.dll

Declaration

public void ShowPrintPreview()
Public Sub 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.

Examples

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.

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

Implements

See Also