Back to Devexpress

RevisionCollection.Get(SubDocument) Method

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

latest3.0 KB
Original Source

RevisionCollection.Get(SubDocument) Method

Retrieves all revisions related to the specific document part.

Namespace : DevExpress.XtraRichEdit.API.Native

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

NuGet Package : DevExpress.RichEdit.Core

Declaration

csharp
IEnumerable<Revision> Get(
    SubDocument subDocument
)
vb
Function Get(
    subDocument As SubDocument
) As IEnumerable(Of Revision)

Parameters

NameTypeDescription
subDocumentSubDocument

An object implementing the SubDocument interface that is the target document part (main body, header or footer, text box or comment.

|

Returns

TypeDescription
IEnumerable<Revision>

A collection of revisions related to the target SubDocument.

|

Remarks

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

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

The code sample below shows how to get revisions made in the text box:

csharp
foreach (Shape shape in documentProcessor.Document.Shapes)
{
    if (shape.TextBox != null)
    {
        var textBoxRevisions = documentRevisions.Get(shape.TextBox.Document);
    }
}
vb
For Each shape As Shape In documentProcessor.Document.Shapes
    If shape.TextBox IsNot Nothing Then
        Dim textBoxRevisions = documentRevisions.[Get](shape.TextBox.Document)
    End If
Next

See Also

RevisionCollection Interface

RevisionCollection Members

DevExpress.XtraRichEdit.API.Native Namespace