Back to Devexpress

BeforeExportEventArgs.DocumentFormat Property

officefileapi-devexpress-dot-xtrarichedit-dot-beforeexporteventargs.md

latest2.6 KB
Original Source

BeforeExportEventArgs.DocumentFormat Property

Gets the format of the document being exported or saved.

Namespace : DevExpress.XtraRichEdit

Assembly : DevExpress.RichEdit.v25.2.Core.dll

NuGet Package : DevExpress.RichEdit.Core

Declaration

csharp
public DocumentFormat DocumentFormat { get; }
vb
Public ReadOnly Property DocumentFormat As DocumentFormat

Property Value

TypeDescription
DocumentFormat

A DocumentFormat enumeration value.

|

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the DocumentFormat 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.

winforms-richedit-save-a-document/CS/SaveDocument/Form1.cs#L46

csharp
{
    if (e.DocumentFormat == DocumentFormat.Rtf)
    {

winforms-richedit-save-a-document/VB/SaveDocument/Form1.vb#L38

vb
Private Sub richEditControl1_BeforeExport(ByVal sender As Object, ByVal e As BeforeExportEventArgs) Handles richEditControl1.BeforeExport
    If e.DocumentFormat = DocumentFormat.Rtf Then
        Dim reduceFileSize As DialogResult = XtraMessageBox.Show("Do you want to reduce the file size and avoid exporting the document theme and properties?",

See Also

BeforeExportEventArgs Class

BeforeExportEventArgs Members

DevExpress.XtraRichEdit Namespace