Back to Devexpress

ChartControlBase.ShowPrintPreview(Window, String, String, PrintSizeMode) Method

wpf-devexpress-dot-xpf-dot-charts-dot-chartcontrolbase-dot-showprintpreview-x28-system-dot-windows-dot-window-system-dot-string-system-dot-string-devexpress-dot-xpf-dot-charts-dot-printsizemode-x29.md

latest3.9 KB
Original Source

ChartControlBase.ShowPrintPreview(Window, String, String, PrintSizeMode) Method

Creates a print document with the specified name from a chart with the specified print size mode and displays the document using the Print Preview window with the specified owner and title.

Namespace : DevExpress.Xpf.Charts

Assembly : DevExpress.Xpf.Charts.v25.2.dll

NuGet Package : DevExpress.Wpf.Charts

Declaration

csharp
public void ShowPrintPreview(
    Window owner,
    string documentName,
    string title,
    PrintSizeMode sizeMode
)
vb
Public Sub ShowPrintPreview(
    owner As Window,
    documentName As String,
    title As String,
    sizeMode As PrintSizeMode
)

Parameters

NameTypeDescription
ownerWindow

The Print Preview owner.

| | documentName | String |

The name which should be used for the document to be displayed in the Print Preview.

| | title | String |

The Print Preview title.

| | sizeMode | PrintSizeMode |

The size mode which must be used when the chart control is previewed before printing.

|

Remarks

To print the document immediately without invoking any dialogs, use the ChartControlBase.PrintDirect method.

To show the standard Print dialog, use the ChartControlBase.Print method. The dialog allows end-users to print the chart, select the printer (if required), specify the range of pages to print, the number of copies, etc.

To export the chart, use the appropriate ExportTo~ method (e.g., ChartControlBase.ExportToHtml, ChartControlBase.ExportToPdf, etc.)

Important

The chart can be previewed, printed and exported only if the DXPrinting Library is available. Make sure you add a reference to the DevExpress.Xpf.Printing.v25.2 assembly.

Methods that allow you to show Print Preview with other preview settings.

NameDescription
ChartControlBase.ShowPrintPreviewDialogCreates the print document and displays the Print Preview of the document as a modal window.
ChartControlBase.ShowRibbonPrintPreviewCreates the print document and displays the Print Preview with the Ribbon toolbar of the document.
ChartControlBase.ShowRibbonPrintPreviewDialogCreates the print document and displays the Print Preview with the Ribbon toolbar of the document as a modal window.

See Also

ChartControlBase Class

ChartControlBase Members

DevExpress.Xpf.Charts Namespace