Class PdfViewerTextSearchWorker
Performs async text search in a Telerik.Windows.Documents.Fixed.Model.RadFixedDocument. The results will be displayed by the RadPdfViewer in the order they are provided.
Inheritance
Namespace: Telerik.Maui.Controls.PdfViewer
Assembly: Telerik.Maui.Controls.dll
Syntax
public class PdfViewerTextSearchWorker : Object
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 Telerik.Windows.Documents.Fixed.Model.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
PdfViewerSearchContext
context
|
Returns
PdfViewerTextSearchResult
|
SearchAsync(PdfViewerSearchContext)
Performs async text search. This method is executed on the main UI thread and returns a System.Threading.Tasks.Task in which the actual text search is performed.
Declaration
protected virtual Task<PdfViewerTextSearchResult> SearchAsync(PdfViewerSearchContext context)
Parameters
PdfViewerSearchContext
context
|
Returns
System.Threading.Tasks.Task<PdfViewerTextSearchResult>
|