ClassPdfViewerTextSearchWorker
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:
public class PdfViewerTextSearchWorker
Inheritance: objectPdfViewerTextSearchWorker
Constructors
PdfViewerTextSearchWorker()
Declaration
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
protected virtual PdfViewerTextSearchResult Search(PdfViewerSearchContext context)
Parameters
context
Returns
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
protected virtual Task<PdfViewerTextSearchResult> SearchAsync(PdfViewerSearchContext context)
Parameters
context
Returns