officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-revisioncollection-dot-acceptall-x28-system-dot-predicate-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-revision-x29.md
Accepts all revisions that meet the specified criteria.
Namespace : DevExpress.XtraRichEdit.API.Native
Assembly : DevExpress.RichEdit.v25.2.Core.dll
NuGet Package : DevExpress.RichEdit.Core
void AcceptAll(
Predicate<Revision> predicate
)
Sub AcceptAll(
predicate As Predicate(Of Revision)
)
| Name | Type | Description |
|---|---|---|
| predicate | Predicate<Revision> |
A Predicate<T> object that defines a set of criteria for the Revision object.
|
The code sample below shows how to accept all revisions from a specific author made on the specified date:
using (RichEditDocumentServer wordProcessor = new RichEditDocumentServer())
{
DateTime dateTime = new DateTime(2019,9,2);
wordProcessor.Document.Revisions.AcceptAll(x=> x.Author == "Nancy Davolio" && x.DateTime == dateTime);
}
Using wordProcessor As New RichEditDocumentServer()
Dim dateTime As New Date(2019,9,2)
wordProcessor.Document.Revisions.AcceptAll(Function(x) x.Author = "Nancy Davolio" AndAlso x.DateTime = dateTime)
End Using
The following code snippets (auto-collected from DevExpress Examples) contain references to the AcceptAll(Predicate<Revision>) 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#L48
//Accept all format changes:
documentRevisions.AcceptAll(x => x.Type == RevisionType.CharacterPropertyChanged || x.Type == RevisionType.ParagraphPropertyChanged || x.Type == RevisionType.SectionPropertyChanged);
winforms-rich-edit-manage-tracked-changes/CS/XtraRichEdit_TrackChanges/Form1.cs#L59
//Accept all format changes:
documentRevisions.AcceptAll(x => x.Type == RevisionType.CharacterPropertyChanged || x.Type == RevisionType.ParagraphPropertyChanged || x.Type == RevisionType.SectionPropertyChanged);
wpf-richedit-manage-tracked-changes/CS/DXRichEdit_TrackChanges/MainWindow.xaml.cs#L42
//Accept all format changes:
documentRevisions.AcceptAll(x => x.Type == RevisionType.CharacterPropertyChanged || x.Type == RevisionType.ParagraphPropertyChanged || x.Type == RevisionType.SectionPropertyChanged);
}
word-document-api-use-track-changes/VB/word-processing-document-api-track-changes/Program.vb#L46
'Accept all format changes:
documentRevisions.AcceptAll(Function(x) x.Type = RevisionType.CharacterPropertyChanged OrElse x.Type = RevisionType.ParagraphPropertyChanged OrElse x.Type = RevisionType.SectionPropertyChanged)
winforms-rich-edit-manage-tracked-changes/VB/XtraRichEdit_TrackChanges/Form1.vb#L50
'Accept all format changes:
documentRevisions.AcceptAll(Function(x) x.Type = RevisionType.CharacterPropertyChanged OrElse x.Type = RevisionType.ParagraphPropertyChanged OrElse x.Type = RevisionType.SectionPropertyChanged)
End Sub
wpf-richedit-manage-tracked-changes/VB/DXRichEdit_TrackChanges/MainWindow.xaml.vb#L35
'Accept all format changes:
documentRevisions.AcceptAll(Function(x) x.Type = RevisionType.CharacterPropertyChanged OrElse x.Type = RevisionType.ParagraphPropertyChanged OrElse x.Type = RevisionType.SectionPropertyChanged)
End Sub
See Also