Back to Devexpress

SubDocument.Range Property

officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-subdocument-475f687d.md

latest5.9 KB
Original Source

SubDocument.Range Property

Gets the range for the current document.

Namespace : DevExpress.XtraRichEdit.API.Native

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

NuGet Package : DevExpress.RichEdit.Core

Declaration

csharp
DocumentRange Range { get; }
vb
ReadOnly Property Range As DocumentRange

Property Value

TypeDescription
DocumentRange

A DocumentRange interface.

|

The following code snippets (auto-collected from DevExpress Examples) contain references to the Range 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.

winforms-richedit-save-text-from-a-range-in-different-formats/CS/GetTextMethodsExample/Form1.cs#L38

csharp
{
    mhtText = richEditControl.Document.GetMhtText(richEditControl.Document.Range);
}

winforms-richedit-document-api/CS/RichEditAPISample/CodeExamples/List.cs#L36

csharp
ParagraphCollection paragraphs = document.Paragraphs;
paragraphs.AddParagraphsToList(document.Range, bulletedList, 0);

word-processing-merge-documents-with-different-headers-and-footers/CS/Helpers/SectionsMerger.cs#L31

csharp
SubDocument target = targetSection.BeginUpdateHeader(headerFooterType);
target.Delete(target.Range);
target.InsertDocumentContent(target.Range.Start, source.Range, InsertOptions.KeepSourceFormatting);

winforms-richeditcontrol-common-api/CS/RichEditAPISample/CodeExamples/RichEditControlActions.cs#L283

csharp
documentServer.LoadDocument(fs, DevExpress.XtraRichEdit.DocumentFormat.OpenXml);
    richEdit.Document.AppendDocumentContent(documentServer.Document.Range);
}

wpf-richedit-document-api/CS/DXRichEditControlAPISample/CodeExamples/ListActions.cs#L36

csharp
ParagraphCollection paragraphs = document.Paragraphs;
paragraphs.AddParagraphsToList(document.Range, bulletedList, 0);

winforms-richedit-save-text-from-a-range-in-different-formats/VB/GetTextMethodsExample/Form1.vb#L32

vb
Else
    mhtText = richEditControl.Document.GetMhtText(richEditControl.Document.Range)
End If

winforms-richedit-document-api/VB/RichEditAPISample/CodeExamples/List.vb#L30

vb
Dim paragraphs As DevExpress.XtraRichEdit.API.Native.ParagraphCollection = document.Paragraphs
paragraphs.AddParagraphsToList(document.Range, bulletedList, 0)
document.EndUpdate()

word-processing-merge-documents-with-different-headers-and-footers/VB/Helpers/SectionsMerger.vb#L30

vb
Dim target As SubDocument = targetSection.BeginUpdateHeader(headerFooterType)
target.Delete(target.Range)
target.InsertDocumentContent(target.Range.Start, source.Range, InsertOptions.KeepSourceFormatting)

winforms-richeditcontrol-common-api/VB/RichEditAPISample/CodeExamples/RichEditControlActions.vb#L290

vb
documentServer.LoadDocument(fs, DevExpress.XtraRichEdit.DocumentFormat.OpenXml)
    richEdit.Document.AppendDocumentContent(documentServer.Document.Range)
End Using

wpf-richedit-document-api/VB/DXRichEditControlAPISample/CodeExamples/ListActions.vb#L33

vb
Dim paragraphs As ParagraphCollection = document.Paragraphs
paragraphs.AddParagraphsToList(document.Range, bulletedList, 0)

See Also

SubDocument Interface

SubDocument Members

DevExpress.XtraRichEdit.API.Native Namespace