Class
PdfViewerTextSearchWorker

Performs async text search in a RadFixedDocument. The results will be displayed by the RadPdfViewer in the order they are provided.

Definition

Namespace:Telerik.Maui.Controls.PdfViewer

Assembly:Telerik.Maui.Controls.dll

Syntax:

cs-api-definition
public class PdfViewerTextSearchWorker

Inheritance: objectPdfViewerTextSearchWorker

Constructors

PdfViewerTextSearchWorker()

Declaration

cs-api-definition
public PdfViewerTextSearchWorker()

Methods

Search(PdfViewerSearchContext)

Performs text search in a thread different from the main UI thread. Override this method when in need to implement custom search logic. Take into consideration that because this does not run in the main thread, access to UI elements and properties may be limited. Use a "lock" statement with the TextDocument as the mutex (example lock(context.Document.TextDocument)) when accessing the RadFixedDocument in order to avoid errors due to concurrent accessing. When creating a PdfViewerTextSearchResult only set the MainSearchResult if you want to override the currently displayed main search result.

Declaration

cs-api-definition
protected virtual PdfViewerTextSearchResult Search(PdfViewerSearchContext context)

Parameters

context

PdfViewerSearchContext

Returns

PdfViewerTextSearchResult

SearchAsync(PdfViewerSearchContext)

Performs async text search. This method is executed on the main UI thread and returns a Task in which the actual text search is performed.

Declaration

cs-api-definition
protected virtual Task<PdfViewerTextSearchResult> SearchAsync(PdfViewerSearchContext context)

Parameters

context

PdfViewerSearchContext

Returns

Task<PdfViewerTextSearchResult>