Back to Devexpress

ChartControlBase.PrintDirect(String, PrintSizeMode) Method

wpf-devexpress-dot-xpf-dot-charts-dot-chartcontrolbase-dot-printdirect-x28-system-dot-string-devexpress-dot-xpf-dot-charts-dot-printsizemode-x29.md

latest3.3 KB
Original Source

ChartControlBase.PrintDirect(String, PrintSizeMode) Method

Prints the chart on a printer with the specified name and size mode immediately.

Namespace : DevExpress.Xpf.Charts

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

NuGet Package : DevExpress.Wpf.Charts

Declaration

csharp
public void PrintDirect(
    string printerName,
    PrintSizeMode sizeMode
)
vb
Public Sub PrintDirect(
    printerName As String,
    sizeMode As PrintSizeMode
)

Parameters

NameTypeDescription
printerNameString

The name of the printer that should print the chart immediately.

| | sizeMode | PrintSizeMode |

The value specifying which size mode the Chart Control must use when it is printed.

|

Remarks

To show the standard Print dialog, use the ChartControlBase.Print method. This 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 display the DevExpress Print Preview, use one of the following methods.

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

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.

See Also

ChartControlBase Class

ChartControlBase Members

DevExpress.Xpf.Charts Namespace