Back to Devexpress

PrintHelper.ShowRibbonPrintPreview(FrameworkElement, IReport) Method

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

latest3.5 KB
Original Source

PrintHelper.ShowRibbonPrintPreview(FrameworkElement, IReport) Method

Creates a document from the specified report, and shows it in the Ribbon Print Preview window.

Namespace : DevExpress.Xpf.Printing

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

NuGet Package : DevExpress.Wpf.Printing

Declaration

csharp
public static Window ShowRibbonPrintPreview(
    FrameworkElement owner,
    IReport report
)
vb
Public Shared Function ShowRibbonPrintPreview(
    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 ShowRibbonPrintPreview(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.

reporting-wpf-create-report-in-code/CS/RuntimeReportsApplication/MainWindow.xaml.cs#L210

csharp
XtraReport report = CreateReport();
    PrintHelper.ShowRibbonPrintPreview(this, report);
}

reporting-wpf-create-report-in-code/VB/RuntimeReportsApplication/MainWindow.xaml.vb#L218

vb
Private Sub PublishReport(ByVal report As XtraReport)
    PrintHelper.ShowRibbonPrintPreview(Me, report)
End Sub

See Also

Invoke a Default Document Preview

PrintHelper Class

PrintHelper Members

DevExpress.Xpf.Printing Namespace