Back to Devexpress

RevisionCollection.RejectAll(SubDocument) Method

officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-revisioncollection-dot-rejectall-x28-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-subdocument-x29.md

latest6.5 KB
Original Source

RevisionCollection.RejectAll(SubDocument) Method

Rejects all revisions in the specific SubDocument instance.

Namespace : DevExpress.XtraRichEdit.API.Native

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

NuGet Package : DevExpress.RichEdit.Core

Declaration

csharp
void RejectAll(
    SubDocument subDocument
)
vb
Sub RejectAll(
    subDocument As SubDocument
)

Parameters

NameTypeDescription
subDocumentSubDocument

A SubDocument instance that is the main document body, header or footer.

|

Remarks

Use this RejectAll method overload to rejects all revisions in a specific document part (main body, header or footer, comment or text box).

Use the SubDocument.GetSubDocumentType() to determine the type of the current SubDocument.

The following properties allow you to access a SubDocument of a specific document part:

Document PartProperty
Main BodyRichEditDocumentServer.Document
Header or FooterSection.BeginUpdateHeader
Section.BeginUpdateFooter
CommentComment.BeginUpdate
Text BoxTextBox.Document

The code sample below shows how to reject all revisions in the first page’s header:

csharp
SubDocument header = documentProcessor.Document.Sections[0].BeginUpdateHeader(HeaderFooterType.First);
documentRevisions.RejectAll(header);
documentProcessor.Document.Sections[0].EndUpdateHeader(header);
vb
Dim header As SubDocument = documentProcessor.Document.Sections(0).BeginUpdateHeader(HeaderFooterType.First)
documentRevisions.RejectAll(header)
documentProcessor.Document.Sections(0).EndUpdateHeader(header)

The following code snippets (auto-collected from DevExpress Examples) contain references to the RejectAll(SubDocument) 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.

word-document-api-use-track-changes/CS/word-processing-document-api-track-changes/Program.cs#L38

csharp
SubDocument header = documentProcessor.Document.Sections[0].BeginUpdateHeader(HeaderFooterType.First);
documentRevisions.RejectAll(header);
documentProcessor.Document.Sections[0].EndUpdateHeader(header);

winforms-rich-edit-manage-tracked-changes/CS/XtraRichEdit_TrackChanges/Form1.cs#L49

csharp
SubDocument header = richEditControl1.Document.Sections[0].BeginUpdateHeader(HeaderFooterType.First);
documentRevisions.RejectAll(header);
richEditControl1.Document.Sections[0].EndUpdateHeader(header);

wpf-richedit-manage-tracked-changes/CS/DXRichEdit_TrackChanges/MainWindow.xaml.cs#L32

csharp
SubDocument header = richEditControl1.Document.Sections[0].BeginUpdateHeader(HeaderFooterType.First);
documentRevisions.RejectAll(header);
richEditControl1.Document.Sections[0].EndUpdateHeader(header);

word-document-api-use-track-changes/VB/word-processing-document-api-track-changes/Program.vb#L35

vb
Dim header As SubDocument = documentProcessor.Document.Sections(0).BeginUpdateHeader(HeaderFooterType.First)
documentRevisions.RejectAll(header)
documentProcessor.Document.Sections(0).EndUpdateHeader(header)

winforms-rich-edit-manage-tracked-changes/VB/XtraRichEdit_TrackChanges/Form1.vb#L41

vb
Dim header As SubDocument = richEditControl1.Document.Sections(0).BeginUpdateHeader(HeaderFooterType.First)
documentRevisions.RejectAll(header)
richEditControl1.Document.Sections(0).EndUpdateHeader(header)

wpf-richedit-manage-tracked-changes/VB/DXRichEdit_TrackChanges/MainWindow.xaml.vb#L26

vb
Dim header As SubDocument = Me.richEditControl1.Document.Sections(0).BeginUpdateHeader(HeaderFooterType.First)
documentRevisions.RejectAll(header)
Me.richEditControl1.Document.Sections(0).EndUpdateHeader(header)

See Also

RevisionCollection Interface

RevisionCollection Members

DevExpress.XtraRichEdit.API.Native Namespace