Document.Selections Property
Provides access to a collection of selections in the document.
Namespace: DevExpress.XtraRichEdit.API.Native
Assembly: DevExpress.RichEdit.v22.1.Core.dll
Declaration
Property Value
Type | Description |
---|---|
SelectionCollection | A SelectionCollection object containing ranges selected in the document. |
Example
document.LoadDocument("SelectionCollection.docx", DocumentFormat.OpenXml)
Dim startPos As Integer = 80
Dim endPos As Integer = document.Tables(0).Rows(1).LastCell.ContentRange.Start.ToInt()
Dim myRange As DocumentRange = document.CreateRange(startPos, endPos - startPos)
document.Selections.Add(myRange)
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Selections 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.