Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DocumentPreviewControl.HiddenExportFormats Property

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.v24.2.dll

NuGet Package: DevExpress.Wpf.Printing

#Declaration

public ObservableCollection<ExportFormat> HiddenExportFormats { get; set; }

#Property Value

Type Description
ObservableCollection<ExportFormat>

The collection of ExportFormat enumeration values, specifying the hidden export formats.

#Remarks

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);
}

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.

See Also