wpf-devexpress-dot-xpf-dot-printing-778677c3.md
A control that you can use to publish (preview, print, and export) documents in WPF applications.
Namespace : DevExpress.Xpf.Printing
Assembly : DevExpress.Xpf.Printing.v25.2.dll
NuGet Package : DevExpress.Wpf.Printing
[DXLicenseWpfReporting]
public class DocumentPreviewControl :
DocumentViewerControl,
IParameterPanelHandler,
IDocumentPreviewUI
<DXLicenseWpfReporting>
Public Class DocumentPreviewControl
Inherits DocumentViewerControl
Implements IParameterPanelHandler,
IDocumentPreviewUI
The following members return DocumentPreviewControl objects:
The DocumentPreviewControl allows you to choose between a Ribbon or Bars toolbar layout.
Do the following to create a Print Preview to publish documents:
Assign a document source to the DocumentPreviewControl’s DocumentSource property.
If you use an IReport or ILink object as a document source, call the document source’s CreateDocument method or set the DocumentPreviewControl’s RequestDocumentCreation property to True to generate a preview.
The following code snippets (auto-collected from DevExpress Examples) contain references to the DocumentPreviewControl class.
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-mvvm-show-report-document-preview/CS/MainWindow.xaml#L16
<DataTemplate>
<dxp:DocumentPreviewControl RequestDocumentCreation="True"
DocumentSource="{Binding Report}" />
reporting-wpf-custom-editor-for-report-parameter/CS/CustomParameterEditorsWPF/MainWindow.xaml#L36
</Window.Resources>
<dxp:DocumentPreviewControl x:Name="preview" />
</Window>
<Grid>
<dxp:DocumentPreviewControl Name="preview" />
</Grid>
<Grid>
<dxp:DocumentPreviewControl Name="preview" CommandBarStyle="Bars">
<dxp:DocumentPreviewControl.HiddenExportFormats>
wpf-reporting-use-custom-controls-for-editing-report-content-in-print-preview/CS/MainWindow.xaml#L26
<DataTemplate>
<dxp:DocumentPreviewControl RequestDocumentCreation="True" DocumentSource="{Binding Report, Mode=OneWay}" />
</DataTemplate>
Object DispatcherObject DependencyObject Visual UIElement FrameworkElement Control DocumentViewerControl DocumentPreviewControl
See Also
DocumentPreviewControl Members