officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-subdocument-dot-findall-x28-system-dot-string-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-searchoptions-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-documentrange-x29.md
Finds all text ranges that match the specified string in the specified document range.
Namespace : DevExpress.XtraRichEdit.API.Native
Assembly : DevExpress.RichEdit.v25.2.Core.dll
NuGet Package : DevExpress.RichEdit.Core
DocumentRange[] FindAll(
string textToFind,
SearchOptions options,
DocumentRange range
)
Function FindAll(
textToFind As String,
options As SearchOptions,
range As DocumentRange
) As DocumentRange()
| Name | Type | Description |
|---|---|---|
| textToFind | String |
A string, specifying the search text.
| | options | SearchOptions |
A SearchOptions enumeration specifying search options.
| | range | DocumentRange |
A DocumentRange object specifying the range in the document in which a search is performed.
|
| Type | Description |
|---|---|
| DocumentRange[] |
An array of DocumentRange objects representing matching text ranges.
|
The following code snippets (auto-collected from DevExpress Examples) contain references to the FindAll(String, SearchOptions, DocumentRange) 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.
winforms-richedit-document-api/CS/RichEditAPISample/CodeExamples/Comments.cs#L22
if (document.Comments.Count > 0) {
DocumentRange[] resRanges = document.FindAll("trump", SearchOptions.None, document.Comments[1].Range);
if (resRanges.Length > 0) {
wpf-richedit-document-api/CS/DXRichEditControlAPISample/CodeExamples/CommentsActions.cs#L30
if (document.Comments.Count > 0) {
DocumentRange[] resRanges = document.FindAll("trump", SearchOptions.None, document.Comments[1].Range);
if (resRanges.Length > 0) {
word-document-api-examples/CS/CodeExamples/CommentsActions.cs#L56
// to which the parent comment relates.
DocumentRange[] resRanges = document.FindAll("trump", SearchOptions.None, document.Comments[1].Range);
if (resRanges.Length > 0)
word-document-api-use-layout-api-to-manage-document-pages/CS/Program.cs#L44
DocumentRange pageDocumentRange = GetPageDocumentRange(rtfProcessor, pageNumber);
DocumentRange[] words = rtfProcessor.Document.FindAll(text, SearchOptions.WholeWord, pageDocumentRange);
return words;
winforms-richedit-document-api/VB/RichEditAPISample/CodeExamples/Comments.vb#L21
If document.Comments.Count > 0 Then
Dim resRanges As DevExpress.XtraRichEdit.API.Native.DocumentRange() = document.FindAll("trump", DevExpress.XtraRichEdit.API.Native.SearchOptions.None, document.Comments(CInt((1))).Range)
If resRanges.Length > 0 Then
wpf-richedit-document-api/VB/DXRichEditControlAPISample/CodeExamples/CommentsActions.vb#L28
If document.Comments.Count > 0 Then
Dim resRanges() As DocumentRange = document.FindAll("trump", SearchOptions.None, document.Comments(1).Range)
If resRanges.Length > 0 Then
word-document-api-examples/VB/CodeExamples/CommentsActions.vb#L50
' to which the parent comment relates.
Dim resRanges As DevExpress.XtraRichEdit.API.Native.DocumentRange() = document.FindAll("trump", DevExpress.XtraRichEdit.API.Native.SearchOptions.None, document.Comments(CInt((1))).Range)
If resRanges.Length > 0 Then
word-document-api-use-layout-api-to-manage-document-pages/VB/Program.vb#L33
Dim pageDocumentRange As DocumentRange = GetPageDocumentRange(rtfProcessor, pageNumber)
Dim words() As DocumentRange = rtfProcessor.Document.FindAll(text, SearchOptions.WholeWord, pageDocumentRange)
Return words
See Also