Comment.BeginUpdate() Method
Provides access to a comment’s content to start editing.
Namespace: DevExpress.XtraRichEdit.API.Native
Assembly: DevExpress.RichEdit.v19.1.Core.dll
Declaration
Returns
Type | Description |
---|---|
SubDocument | A SubDocument object which is the content of the comment. |
Remarks
The BeginUpdate method allows you to change the content of a current comment. Use the Comment.EndUpdate method to finalize editing.
Example
Note
A complete sample project is available at https://github.com/DevExpress-Examples/winforms-richedit-document-api-e5219
document.LoadDocument("Grimm.docx", DevExpress.XtraRichEdit.DocumentFormat.OpenXml)
Dim commentCount As Integer = document.Comments.Count
If commentCount > 0 Then
Dim comment As DevExpress.XtraRichEdit.API.Native.Comment = document.Comments(document.Comments.Count - 1)
If comment IsNot Nothing Then
Dim commentDocument As SubDocument = comment.BeginUpdate()
commentDocument.InsertText(commentDocument.CreatePosition(0), "some text")
commentDocument.Tables.Create(commentDocument.CreatePosition(9), 5, 4)
comment.EndUpdate(commentDocument)
End If
End If
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the BeginUpdate() 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.