Back to Devexpress

PrintHelper.ShowPrintPreview(FrameworkElement, IReport) Method

wpf-devexpress-dot-xpf-dot-printing-dot-printhelper-dot-showprintpreview-x28-system-dot-windows-dot-frameworkelement-devexpress-dot-xtrareports-dot-ireport-x29.md

latest3.6 KB
Original Source

PrintHelper.ShowPrintPreview(FrameworkElement, IReport) Method

Creates a document from the specified link, and shows it in the Document Preview window.

Namespace : DevExpress.Xpf.Printing

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

NuGet Package : DevExpress.Wpf.Printing

Declaration

csharp
public static Window ShowPrintPreview(
    FrameworkElement owner,
    IReport report
)
vb
Public Shared Function ShowPrintPreview(
    owner As FrameworkElement,
    report As IReport
) As Window

Parameters

NameTypeDescription
ownerFrameworkElement

A FrameworkElement object, which is the owner of the dialog.

| | report | IReport |

An object implementing the IReport interface, which represents the report to preview.

|

Returns

TypeDescription
Window

A Window object.

|

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ShowPrintPreview(FrameworkElement, IReport) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

wpf-scheduler-use-scheduler-report-to-print-and-export-appointments/CS/PrintingExample/MyPrintHelper.cs#L18

csharp
scheduler.SchedulerPrintAdapter.AssignToReport(report);
    PrintHelper.ShowPrintPreview(mainWindow, report);
}

wpf-scheduler-use-scheduler-report-to-print-and-export-appointments/VB/PrintingExample/MyPrintHelper.vb#L18

vb
scheduler.SchedulerPrintAdapter.AssignToReport(report)
    PrintHelper.ShowPrintPreview(mainWindow, report)
End Sub

See Also

Invoke a Default Document Preview

PrintHelper Class

PrintHelper Members

DevExpress.Xpf.Printing Namespace