Document.Selections Property
Provides access to a collection of selections in the document.
Namespace: DevExpress.XtraRichEdit.API.Native
Assembly: DevExpress.RichEdit.v20.2.Core.dll
NuGet Package: DevExpress.RichEdit.Core
NuGet Packages: DevExpress.RichEdit.Core, DevExpress.WindowsDesktop.RichEdit.Core
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)
See Also