wpf-devexpress-dot-xpf-dot-printing-dot-documentpreviewcontrol-7a1e7d3e.md
Provides access to the collection of export formats that cannot be used to export the document. This is a dependency property.
Namespace : DevExpress.Xpf.Printing
Assembly : DevExpress.Xpf.Printing.v25.2.dll
NuGet Package : DevExpress.Wpf.Printing
public ObservableCollection<ExportFormat> HiddenExportFormats { get; set; }
Public Property HiddenExportFormats As ObservableCollection(Of ExportFormat)
| Type | Description |
|---|---|
| ObservableCollection<ExportFormat> |
The collection of ExportFormat enumeration values, specifying the hidden export formats.
|
The DocumentPreviewControl allows users to export the currently displayed document to various third-party formats. To prohibit exporting the document to a specific format, add this format to the HiddenExportFormats collection.
using System.Windows;
using DevExpress.XtraPrinting;
//...
private void DocumentPreview_Loaded(object sender, RoutedEventArgs e) {
XtraReport1 report = new XtraReport1();
documentPreview.DocumentSource = report;
report.CreateDocument();
documentPreview.HiddenExportFormats.Add(ExportFormat.Pdf);
}
Imports System.Windows
Imports DevExpress.XtraPrinting
'...
Private Sub DocumentPreview_Loaded(ByVal sender As Object, ByVal e As RoutedEventArgs)
Dim report As New XtraReport1()
documentPreview.DocumentSource = report
report.CreateDocument()
documentPreview.HiddenExportFormats.Add(ExportFormat.Pdf)
End Sub
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:dxp="http://schemas.devexpress.com/winfx/2008/xaml/printing">
...
<dxp:DocumentPreviewControl x:Name="documentPreview" Loaded="DocumentPreview_Loaded" />
</Window>
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the HiddenExportFormats property.
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.
<dxp:DocumentPreviewControl Name="preview" CommandBarStyle="Bars">
<dxp:DocumentPreviewControl.HiddenExportFormats>
<printing:ExportFormat>Htm</printing:ExportFormat>
See Also